Class UnaryPropertyExpression
- java.lang.Object
-
- org.vedantatree.expressionoasis.expressions.UnaryOperatorExpression
-
- org.vedantatree.expressionoasis.expressions.property.UnaryPropertyExpression
-
- All Implemented Interfaces:
Expression
public class UnaryPropertyExpression extends UnaryOperatorExpression
This is the unary expression which access the property of a java object, and assume this java object with context object
-
-
Constructor Summary
Constructors Constructor Description UnaryPropertyExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Type
getReturnType()
Gets the return type of the expression.ValueObject
getValue()
Executes and returns the value of this expression.void
initialize(ExpressionContext expressionContext, Object parameters, boolean validate)
Initializes the operand expression.void
setValue(Object value)
Sets the valuevoid
uninitialize(ExpressionContext expressionContext)
Uninitializes the unary operator expression.protected void
validate(ExpressionContext expressionContext)
Validates the expression.-
Methods inherited from class org.vedantatree.expressionoasis.expressions.UnaryOperatorExpression
accept, addTypePair, getOperandExpression, toString
-
-
-
-
Method Detail
-
getValue
public ValueObject getValue() throws ExpressionEngineException
Description copied from interface:Expression
Executes and returns the value of this expression. If expression is not at node level, it will further evaluate its related expression which may represents operands or operators and return the final outcome.- Returns:
- the value of expression (after expression evaluation)
- Throws:
ExpressionEngineException
- if there is any problem during execution- See Also:
Expression.getValue()
-
setValue
public void setValue(Object value) throws ExpressionEngineException
Sets the value- Parameters:
value
-- Throws:
ExpressionEngineException
-
initialize
public void initialize(ExpressionContext expressionContext, Object parameters, boolean validate) throws ExpressionEngineException
Description copied from class:UnaryOperatorExpression
Initializes the operand expression.- Specified by:
initialize
in interfaceExpression
- Overrides:
initialize
in classUnaryOperatorExpression
- 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)
-
getReturnType
public Type getReturnType() throws ExpressionEngineException
Description copied from interface:Expression
Gets the return type of the expression.- Specified by:
getReturnType
in interfaceExpression
- Overrides:
getReturnType
in classUnaryOperatorExpression
- Returns:
- the type of expression
- Throws:
ExpressionEngineException
- If there is any problem during execution- See Also:
Expression.getReturnType()
-
validate
protected void validate(ExpressionContext expressionContext) throws ExpressionEngineException
Description copied from class:UnaryOperatorExpression
Validates the expression.- Overrides:
validate
in classUnaryOperatorExpression
- Throws:
ExpressionEngineException
- See Also:
org.vedantatree.expressionoasis.expressions.UnaryOperatorExpression#validate()
-
uninitialize
public void uninitialize(ExpressionContext expressionContext)
Description copied from class:UnaryOperatorExpression
Uninitializes the unary operator expression.- Specified by:
uninitialize
in interfaceExpression
- Overrides:
uninitialize
in classUnaryOperatorExpression
- Parameters:
expressionContext
- contextual information, may help in un-initialization- See Also:
Expression.uninitialize(org.vedantatree.expressionoasis.ExpressionContext)
-
-