|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jec.Operator net.sf.jec.InvertibleOperator net.sf.jec.AccessorOperator
This operator returns/sets a property of the context object. The actual "property" definition depends on the context object class:
Field Summary |
Fields inherited from class net.sf.jec.Operator |
argOps, nestedOp, showFunctionString |
Constructor Summary | |
AccessorOperator(java.lang.String field,
boolean throwExceptions)
Creates a new AccessorOperator that will try to get and set the field property of the context |
|
AccessorOperator(java.lang.String field,
Operator nestedOp,
boolean throwExceptions)
Creates a new AccessorOperator that will try to get and set the field property of the context |
Method Summary | |
protected java.lang.Object |
directMap(java.lang.Object rootCtx,
java.lang.Object ctx)
Returns the associated value to the given context and root context |
protected void |
inverseMap(java.lang.Object rootCtx,
java.lang.Object ctx,
java.lang.Object value)
Sets the given value if this operator is at the end of the operator chain or just resolves the context object and passes it to the next operator in the chain. |
java.lang.String |
toExpressionString()
Returns an expression String representation for this operator |
java.lang.String |
toFunctionString()
Returns a function representation String for this operator |
Methods inherited from class net.sf.jec.InvertibleOperator |
applyInverse |
Methods inherited from class net.sf.jec.Operator |
apply, setArgumentOperators, setNestedOperator, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AccessorOperator(java.lang.String field, boolean throwExceptions)
field
property of the context
field
- The field that will be accessedthrowExceptions
- public AccessorOperator(java.lang.String field, Operator nestedOp, boolean throwExceptions)
field
property of the context
field
- The field that will be accessednestedOp
- The nested operatorthrowExceptions
- Method Detail |
public java.lang.String toFunctionString()
toFunctionString
in class Operator
public java.lang.String toExpressionString()
toExpressionString
in class Operator
protected java.lang.Object directMap(java.lang.Object rootCtx, java.lang.Object ctx) throws EvaluationException
directMap
in class Operator
rootCtx
- The root context, needed for operators that require
expression evaluation from root point. Example: Indexer operatorsctx
- The current context where the operator will work over
EvaluationException
- Thrown if there's an evaluation problemprotected void inverseMap(java.lang.Object rootCtx, java.lang.Object ctx, java.lang.Object value) throws EvaluationException
inverseMap
in class InvertibleOperator
rootCtx
- The root context, needed for operators that require
expression evaluation from root point. Example: Indexer operatorsctx
- The current context where the operator will work overvalue
- The value to set.
EvaluationException
- Thrown if there's an evaluation problem
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |