org.eigenbase.rex
Class RexDynamicParam

java.lang.Object
  extended by org.eigenbase.rex.RexNode
      extended by org.eigenbase.rex.RexVariable
          extended by org.eigenbase.rex.RexDynamicParam

public class RexDynamicParam
extends RexVariable

Dynamic parameter reference in a row-expression.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/rex/RexDynamicParam.java#13 $
Author:
John V. Sichi

Field Summary
private  int index
           
 
Fields inherited from class org.eigenbase.rex.RexVariable
name, type
 
Fields inherited from class org.eigenbase.rex.RexNode
digest, EMPTY_ARRAY
 
Constructor Summary
RexDynamicParam(RelDataType type, int index)
          Creates a dynamic parameter.
 
Method Summary
<R> R
accept(RexVisitor<R> visitor)
          Accepts a visitor, dispatching to the right overloaded visitXxx method.
 RexDynamicParam clone()
           
 int getIndex()
           
 RexKind getKind()
          Returns the kind of node this is.
 
Methods inherited from class org.eigenbase.rex.RexVariable
getName, getType
 
Methods inherited from class org.eigenbase.rex.RexNode
isA, isAlwaysTrue, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

private final int index
Constructor Detail

RexDynamicParam

public RexDynamicParam(RelDataType type,
                       int index)
Creates a dynamic parameter.

Parameters:
type - inferred type of parameter
index - 0-based index of dynamic parameter in statement
Method Detail

clone

public RexDynamicParam clone()
Specified by:
clone in class RexNode

getKind

public RexKind getKind()
Description copied from class: RexNode
Returns the kind of node this is.

Overrides:
getKind in class RexNode
Returns:
A RexKind value, never null

getIndex

public int getIndex()

accept

public <R> R accept(RexVisitor<R> visitor)
Description copied from class: RexNode
Accepts a visitor, dispatching to the right overloaded visitXxx method.

Also see RexProgram.apply(RexVisitor, RexNode[], RexNode), which applies a visitor to several expressions simultaneously.

Specified by:
accept in class RexNode