Class NullExpression
- java.lang.Object
-
- org.vedantatree.expressionoasis.expressions.NullExpression
-
- All Implemented Interfaces:
Expression
public class NullExpression extends Object implements Expression
This class expression is used to make the null value expression. It gives the null value. Based on Numeric Expression. TODO: should we create a special null type in Type class rather than using Type.createType("java.lang.Object")? Currently don't have that option as the code for Type class is not yet available.
-
-
Constructor Summary
Constructors Constructor Description NullExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ExpressionVisitor visitor)
Allows an expression visitor to visit this expression and it's sub-expressions (implements Visitor design pattern).Type
getReturnType()
Returns the long type.ValueObject
getValue()
Gets the value object for numeric value.void
initialize(ExpressionContext expressionContext, Object parameters, boolean validate)
Initializes the numeric value object.String
toString()
void
uninitialize(ExpressionContext expressionContext)
Uninitaizes the expression
-
-
-
Method Detail
-
getValue
public ValueObject getValue() throws ExpressionEngineException
Gets the value object for numeric value.- Specified by:
getValue
in interfaceExpression
- Returns:
- the value of expression (after expression evaluation)
- Throws:
ExpressionEngineException
- if there is any problem during execution- See Also:
Expression.getValue()
-
getReturnType
public Type getReturnType() throws ExpressionEngineException
Returns the long type.- Specified by:
getReturnType
in interfaceExpression
- Returns:
- the type of expression
- Throws:
ExpressionEngineException
- If there is any problem during execution- See Also:
Expression.getReturnType()
-
initialize
public void initialize(ExpressionContext expressionContext, Object parameters, boolean validate) throws ExpressionEngineException
Initializes the numeric value object.- Specified by:
initialize
in interfaceExpression
- Parameters:
expressionContext
- contextual information, may help in initializationparameters
- for example, sub expressions and identifiers- Throws:
ExpressionEngineException
- if there is any problem during execution- See Also:
org.vedantatree.expressionoasis.expressions.Expression#initialize(org.vedantatree.expressionoasis.ExpressionContext, java.lang.Object)
-
uninitialize
public void uninitialize(ExpressionContext expressionContext)
Uninitaizes the expression- Specified by:
uninitialize
in interfaceExpression
- Parameters:
expressionContext
- contextual information, may help in un-initialization- See Also:
Expression.uninitialize(org.vedantatree.expressionoasis.ExpressionContext)
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
accept
public void accept(ExpressionVisitor visitor)
Allows an expression visitor to visit this expression and it's sub-expressions (implements Visitor design pattern).- Specified by:
accept
in interfaceExpression
- Parameters:
visitor
- a visitor object that this expression must visit when accept is called.- See Also:
Expression.accept(org.vedantatree.expressionoasis.ExpressionVisitor)
-
-