Package org.apache.calcite.linq4j.tree
Class FunctionExpression<F extends Function<?>>
- java.lang.Object
-
- org.apache.calcite.linq4j.tree.AbstractNode
-
- org.apache.calcite.linq4j.tree.Expression
-
- org.apache.calcite.linq4j.tree.LambdaExpression
-
- org.apache.calcite.linq4j.tree.FunctionExpression<F>
-
- Type Parameters:
F
- Function type
- All Implemented Interfaces:
Node
public final class FunctionExpression<F extends Function<?>> extends LambdaExpression
Represents a strongly typed lambda expression as a data structure in the form of an expression tree. This class cannot be inherited.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FunctionExpression.Invokable
Function that can be invoked with a variable number of arguments.
-
Field Summary
Fields Modifier and Type Field Description BlockStatement
body
private F
dynamicFunction
F
function
private int
hash
Cache the hash code for the expressionjava.util.List<ParameterExpression>
parameterList
-
Fields inherited from class org.apache.calcite.linq4j.tree.AbstractNode
nodeType, type
-
-
Constructor Summary
Constructors Modifier Constructor Description FunctionExpression(F function)
private
FunctionExpression(java.lang.Class<F> type, F function, BlockStatement body, java.util.List<ParameterExpression> parameterList)
FunctionExpression(java.lang.Class<F> type, BlockStatement body, java.util.List<ParameterExpression> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
accept(ExpressionWriter writer, int lprec, int rprec)
Expression
accept(Shuttle shuttle)
<R> R
accept(Visitor<R> visitor)
FunctionExpression.Invokable
compile()
boolean
equals(java.lang.Object o)
private java.lang.reflect.Method
getAbstractMethod()
private java.lang.String
getAbstractMethodName()
F
getFunction()
int
hashCode()
private boolean
isAbstractMethodPrimitive()
-
Methods inherited from class org.apache.calcite.linq4j.tree.Expression
canReduce
-
Methods inherited from class org.apache.calcite.linq4j.tree.AbstractNode
accept, accept0, evaluate, getNodeType, getType, toString
-
-
-
-
Field Detail
-
body
public final BlockStatement body
-
parameterList
public final java.util.List<ParameterExpression> parameterList
-
hash
private int hash
Cache the hash code for the expression
-
-
Constructor Detail
-
FunctionExpression
private FunctionExpression(java.lang.Class<F> type, F function, BlockStatement body, java.util.List<ParameterExpression> parameterList)
-
FunctionExpression
public FunctionExpression(F function)
-
FunctionExpression
public FunctionExpression(java.lang.Class<F> type, BlockStatement body, java.util.List<ParameterExpression> parameters)
-
-
Method Detail
-
accept
public Expression accept(Shuttle shuttle)
- Specified by:
accept
in interfaceNode
- Overrides:
accept
in classLambdaExpression
-
accept
public <R> R accept(Visitor<R> visitor)
- Specified by:
accept
in interfaceNode
- Overrides:
accept
in classLambdaExpression
-
compile
public FunctionExpression.Invokable compile()
-
getFunction
public F getFunction()
-
accept
void accept(ExpressionWriter writer, int lprec, int rprec)
- Overrides:
accept
in classAbstractNode
-
isAbstractMethodPrimitive
private boolean isAbstractMethodPrimitive()
-
getAbstractMethodName
private java.lang.String getAbstractMethodName()
-
getAbstractMethod
private java.lang.reflect.Method getAbstractMethod()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAbstractNode
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractNode
-
-