org.pm4j.core.pm.impl.expr
Class PmVariableOrAttributeExpr

java.lang.Object
  extended by org.pm4j.core.pm.impl.expr.PmVariableOrAttributeExpr
All Implemented Interfaces:
Expression, OptionalExpression

public class PmVariableOrAttributeExpr
extends java.lang.Object
implements OptionalExpression

An expression that gets initialized by a name that may represent an attribute or a PM variable.
The expression searches at runtime first for an attribute and if that's not found, for a PM variable.

Author:
olaf boede

Constructor Summary
PmVariableOrAttributeExpr(NameWithModifier nameWithModifier)
           
 
Method Summary
 java.lang.Object exec(ExprExecCtxt ctxt)
           
 void execAssign(ExprExecCtxt ctxt, java.lang.Object value)
          Value assignment operation.
 boolean isOptional()
           
static OptionalExpression parse(ParseCtxt ctxt)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PmVariableOrAttributeExpr

public PmVariableOrAttributeExpr(NameWithModifier nameWithModifier)
Method Detail

exec

public java.lang.Object exec(ExprExecCtxt ctxt)
Specified by:
exec in interface Expression

execAssign

public void execAssign(ExprExecCtxt ctxt,
                       java.lang.Object value)
Description copied from interface: Expression
Value assignment operation. Is supported by path expressions that reference attributes that provide public modification access (setter or public non-final declaration).

Specified by:
execAssign in interface Expression
Parameters:
ctxt - Run time context data for the expression evaluation.
value - The value to set to the field, addressed by the path.

isOptional

public boolean isOptional()
Specified by:
isOptional in interface OptionalExpression

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

parse

public static OptionalExpression parse(ParseCtxt ctxt)