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 interfaceFunctionExpression.InvokableFunction that can be invoked with a variable number of arguments.
-
Field Summary
Fields Modifier and Type Field Description BlockStatementbodyprivate FdynamicFunctionFfunctionprivate inthashCache the hash code for the expressionList<ParameterExpression>parameterList-
Fields inherited from class org.apache.calcite.linq4j.tree.AbstractNode
nodeType, type
-
-
Constructor Summary
Constructors Modifier Constructor Description FunctionExpression(F function)privateFunctionExpression(Class<F> type, F function, BlockStatement body, List<ParameterExpression> parameterList)FunctionExpression(Class<F> type, BlockStatement body, List<ParameterExpression> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaccept(ExpressionWriter writer, int lprec, int rprec)Expressionaccept(Shuttle shuttle)<R> Raccept(Visitor<R> visitor)FunctionExpression.Invokablecompile()booleanequals(Object o)private MethodgetAbstractMethod()private StringgetAbstractMethodName()FgetFunction()inthashCode()private booleanisAbstractMethodPrimitive()-
Methods inherited from class org.apache.calcite.linq4j.tree.AbstractNode
accept, accept0, evaluate, getNodeType, getType, toString
-
Methods inherited from class org.apache.calcite.linq4j.tree.Expression
canReduce
-
-
-
-
Field Detail
-
body
public final BlockStatement body
-
parameterList
public final List<ParameterExpression> parameterList
-
hash
private int hash
Cache the hash code for the expression
-
-
Constructor Detail
-
FunctionExpression
private FunctionExpression(Class<F> type, F function, BlockStatement body, List<ParameterExpression> parameterList)
-
FunctionExpression
public FunctionExpression(F function)
-
FunctionExpression
public FunctionExpression(Class<F> type, BlockStatement body, List<ParameterExpression> parameters)
-
-
Method Detail
-
accept
public Expression accept(Shuttle shuttle)
- Specified by:
acceptin interfaceNode- Overrides:
acceptin classLambdaExpression
-
accept
public <R> R accept(Visitor<R> visitor)
- Specified by:
acceptin interfaceNode- Overrides:
acceptin classLambdaExpression
-
compile
public FunctionExpression.Invokable compile()
-
getFunction
public F getFunction()
-
accept
void accept(ExpressionWriter writer, int lprec, int rprec)
- Overrides:
acceptin classAbstractNode
-
isAbstractMethodPrimitive
private boolean isAbstractMethodPrimitive()
-
getAbstractMethodName
private String getAbstractMethodName()
-
getAbstractMethod
private Method getAbstractMethod()
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractNode
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractNode
-
-