org.eigenbase.rex
Class RexCopier

java.lang.Object
  extended by org.eigenbase.rex.RexShuttle
      extended by org.eigenbase.rex.RexCopier
All Implemented Interfaces:
RexVisitor<RexNode>

 class RexCopier
extends RexShuttle

Shuttle which creates a deep copy of a Rex expression.

This is useful when copying objects from one type factory or builder to another.

Due to the laziness of the author, not all Rex types are supported at present.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/rex/RexCopier.java#4 $
Author:
jhyde
See Also:
RexBuilder.copy(RexNode)

Field Summary
private  RexBuilder builder
           
 
Constructor Summary
RexCopier(RexBuilder builder)
          Creates a RexCopier.
 
Method Summary
 RexNode visitCall(RexCall call)
           
 RexNode visitCorrelVariable(RexCorrelVariable variable)
           
 RexNode visitDynamicParam(RexDynamicParam dynamicParam)
           
 RexNode visitFieldAccess(RexFieldAccess fieldAccess)
           
 RexNode visitInputRef(RexInputRef inputRef)
           
 RexNode visitLiteral(RexLiteral literal)
           
 RexNode visitLocalRef(RexLocalRef localRef)
           
 RexNode visitOver(RexOver over)
           
 RexNode visitRangeRef(RexRangeRef rangeRef)
           
 RexWindow visitWindow(RexWindow window)
           
 
Methods inherited from class org.eigenbase.rex.RexShuttle
apply, apply, visitArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

builder

private final RexBuilder builder
Constructor Detail

RexCopier

RexCopier(RexBuilder builder)
Creates a RexCopier.

Parameters:
builder - Builder
Method Detail

visitOver

public RexNode visitOver(RexOver over)
Specified by:
visitOver in interface RexVisitor<RexNode>
Overrides:
visitOver in class RexShuttle

visitWindow

public RexWindow visitWindow(RexWindow window)
Overrides:
visitWindow in class RexShuttle

visitCall

public RexNode visitCall(RexCall call)
Specified by:
visitCall in interface RexVisitor<RexNode>
Overrides:
visitCall in class RexShuttle

visitCorrelVariable

public RexNode visitCorrelVariable(RexCorrelVariable variable)
Specified by:
visitCorrelVariable in interface RexVisitor<RexNode>
Overrides:
visitCorrelVariable in class RexShuttle

visitFieldAccess

public RexNode visitFieldAccess(RexFieldAccess fieldAccess)
Specified by:
visitFieldAccess in interface RexVisitor<RexNode>
Overrides:
visitFieldAccess in class RexShuttle

visitInputRef

public RexNode visitInputRef(RexInputRef inputRef)
Specified by:
visitInputRef in interface RexVisitor<RexNode>
Overrides:
visitInputRef in class RexShuttle

visitLocalRef

public RexNode visitLocalRef(RexLocalRef localRef)
Specified by:
visitLocalRef in interface RexVisitor<RexNode>
Overrides:
visitLocalRef in class RexShuttle

visitLiteral

public RexNode visitLiteral(RexLiteral literal)
Specified by:
visitLiteral in interface RexVisitor<RexNode>
Overrides:
visitLiteral in class RexShuttle

visitDynamicParam

public RexNode visitDynamicParam(RexDynamicParam dynamicParam)
Specified by:
visitDynamicParam in interface RexVisitor<RexNode>
Overrides:
visitDynamicParam in class RexShuttle

visitRangeRef

public RexNode visitRangeRef(RexRangeRef rangeRef)
Specified by:
visitRangeRef in interface RexVisitor<RexNode>
Overrides:
visitRangeRef in class RexShuttle