Package org.apache.calcite.linq4j.tree
Class ConstantExpression
- java.lang.Object
-
- org.apache.calcite.linq4j.tree.AbstractNode
-
- org.apache.calcite.linq4j.tree.Expression
-
- org.apache.calcite.linq4j.tree.ConstantExpression
-
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
ConstantUntypedNull
public class ConstantExpression extends Expression
Represents an expression that has a constant value.
-
-
Field Summary
Fields Modifier and Type Field Description Objectvalue-
Fields inherited from class org.apache.calcite.linq4j.tree.AbstractNode
nodeType, type
-
-
Constructor Summary
Constructors Constructor Description ConstantExpression(Type type, Object value)
-
Method Summary
All Methods Static 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)private static booleanargsMatchFields(Field[] fields, Class<?>[] parameterTypes)booleanequals(Object o)private static voidescapeString(StringBuilder buf, String s)Objectevaluate(Evaluator evaluator)inthashCode()private static voidlist(ExpressionWriter writer, List list, String begin, String sep, String end)private static ExpressionWritermap(ExpressionWriter writer, Map map, String begin, String entrySep, String end)private static ConstructormatchingConstructor(Object value)private static ExpressionWriterwrite(ExpressionWriter writer, Object value, Type type)private static ExpressionWriterwriteMap(ExpressionWriter writer, Map map)-
Methods inherited from class org.apache.calcite.linq4j.tree.AbstractNode
accept, accept0, getNodeType, getType, toString
-
Methods inherited from class org.apache.calcite.linq4j.tree.Expression
canReduce
-
-
-
-
Field Detail
-
value
public final Object value
-
-
Method Detail
-
evaluate
public Object evaluate(Evaluator evaluator)
- Overrides:
evaluatein classAbstractNode
-
accept
public Expression accept(Shuttle shuttle)
- Specified by:
acceptin interfaceNode- Specified by:
acceptin classExpression
-
accept
public <R> R accept(Visitor<R> visitor)
-
accept
void accept(ExpressionWriter writer, int lprec, int rprec)
- Overrides:
acceptin classAbstractNode
-
write
private static ExpressionWriter write(ExpressionWriter writer, Object value, Type type)
-
list
private static void list(ExpressionWriter writer, List list, String begin, String sep, String end)
-
writeMap
private static ExpressionWriter writeMap(ExpressionWriter writer, Map map)
-
map
private static ExpressionWriter map(ExpressionWriter writer, Map map, String begin, String entrySep, String end)
-
matchingConstructor
private static Constructor matchingConstructor(Object value)
-
escapeString
private static void escapeString(StringBuilder buf, String s)
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractNode
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractNode
-
-