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 TypegetReturnType()Gets the return type of the expression.ValueObjectgetValue()Executes and returns the value of this expression.voidinitialize(ExpressionContext expressionContext, Object parameters, boolean validate)Initializes the operand expression.voidsetValue(Object value)Sets the valuevoiduninitialize(ExpressionContext expressionContext)Uninitializes the unary operator expression.protected voidvalidate(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:ExpressionExecutes 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:UnaryOperatorExpressionInitializes the operand expression.- Specified by:
initializein interfaceExpression- Overrides:
initializein 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:ExpressionGets the return type of the expression.- Specified by:
getReturnTypein interfaceExpression- Overrides:
getReturnTypein 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:UnaryOperatorExpressionValidates the expression.- Overrides:
validatein classUnaryOperatorExpression- Throws:
ExpressionEngineException- See Also:
org.vedantatree.expressionoasis.expressions.UnaryOperatorExpression#validate()
-
uninitialize
public void uninitialize(ExpressionContext expressionContext)
Description copied from class:UnaryOperatorExpressionUninitializes the unary operator expression.- Specified by:
uninitializein interfaceExpression- Overrides:
uninitializein classUnaryOperatorExpression- Parameters:
expressionContext- contextual information, may help in un-initialization- See Also:
Expression.uninitialize(org.vedantatree.expressionoasis.ExpressionContext)
-
-