Package ognl
Class Evaluation
java.lang.Object
ognl.Evaluation
An
Evaluation
is and object that holds a node being evaluated
and the source from which that node will take extract its
value. It refers to child evaluations that occur as
a result of the nodes' evaluation.-
Constructor Summary
ConstructorsConstructorDescriptionEvaluation
(SimpleNode node, Object source) Constructs a new "get"Evaluation
from the node and source given.Evaluation
(SimpleNode node, Object source, boolean setOperation) Constructs a newEvaluation
from the node and source given. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(Evaluation child) Adds a child to the list of children of this evaluation.Returns the exception that occurred as a result of evaluating the Evaluation, or null if no exception occurred.Returns the first child of this evaluation.Gets the first descendent.Returns the last child of this evaluation.Gets the last descendent.getNext()
Returns the next sibling of this evaluation.getNode()
Returns theSimpleNode
for thisEvaluation
Returns the parent evaluation of this evaluation.Returns the previous sibling of this evaluation.Returns the result of the Evaluation, or null if it was a set operation.Returns the source object on which this Evaluation operated.void
init
(SimpleNode node, Object source, boolean setOperation) Reinitializes this Evaluation to the parameters specified.boolean
Returns true if this Evaluation represents a set operation.void
reset()
Resets this Evaluation to the initial state.void
setException
(Throwable value) Sets the exception that occurred as a result of evaluating the Evaluation.void
setNode
(SimpleNode value) Sets the node of the evaluation.void
Sets the result of the Evaluation.void
setSetOperation
(boolean value) Marks the Evaluation as a set operation if the value is true, else marks it as a get operation.void
Sets the source of the evaluation.toString()
Returns a String description of the Evaluation.Produces a String value for the Evaluation.Produces a String value for the Evaluation.
-
Constructor Details
-
Evaluation
Constructs a new "get"Evaluation
from the node and source given. -
Evaluation
Constructs a newEvaluation
from the node and source given. IfsetOperation
is true thisEvaluation
represents a "set" as opposed to a "get".
-
-
Method Details
-
getNode
Returns theSimpleNode
for thisEvaluation
-
setNode
Sets the node of the evaluation. Normally applications do not need to set this. Notable exceptions to this rule are custom evaluators that choose between navigable objects (as in a multi-root evaluator where the navigable node is chosen at runtime). -
getSource
Returns the source object on which this Evaluation operated. -
setSource
Sets the source of the evaluation. Normally applications do not need to set this. Notable exceptions to this rule are custom evaluators that choose between navigable objects (as in a multi-root evaluator where the navigable node is chosen at runtime). -
isSetOperation
public boolean isSetOperation()Returns true if this Evaluation represents a set operation. -
setSetOperation
public void setSetOperation(boolean value) Marks the Evaluation as a set operation if the value is true, else marks it as a get operation. -
getResult
Returns the result of the Evaluation, or null if it was a set operation. -
setResult
Sets the result of the Evaluation. This method is normally only used interally and should not be set without knowledge of what you are doing. -
getException
Returns the exception that occurred as a result of evaluating the Evaluation, or null if no exception occurred. -
setException
Sets the exception that occurred as a result of evaluating the Evaluation. This method is normally only used interally and should not be set without knowledge of what you are doing. -
getParent
Returns the parent evaluation of this evaluation. If this returns null then it is is the root evaluation of a tree. -
getNext
Returns the next sibling of this evaluation. Returns null if this is the last in a chain of evaluations. -
getPrevious
Returns the previous sibling of this evaluation. Returns null if this is the first in a chain of evaluations. -
getFirstChild
Returns the first child of this evaluation. Returns null if there are no children. -
getLastChild
Returns the last child of this evaluation. Returns null if there are no children. -
getFirstDescendant
Gets the first descendent. In any Evaluation tree this will the Evaluation that was first executed. -
getLastDescendant
Gets the last descendent. In any Evaluation tree this will the Evaluation that was most recently executing. -
addChild
Adds a child to the list of children of this evaluation. The parent of the child is set to the receiver and the children references are modified in the receiver to reflect the new child. The lastChild of the receiver is set to the child, and the firstChild is set also if child is the first (or only) child. -
init
Reinitializes this Evaluation to the parameters specified. -
reset
public void reset()Resets this Evaluation to the initial state. -
toString
Produces a String value for the Evaluation. If compact is true then a more compact form of the description only including the node type and unique identifier is shown, else a full description including source and result are shown. If showChildren is true the child evaluations are printed using the depth string given as a prefix. -
toString
Produces a String value for the Evaluation. If compact is true then a more compact form of the description only including the node type and unique identifier is shown, else a full description including source and result are shown. Child evaluations are printed using the depth string given as a prefix. -
toString
Returns a String description of the Evaluation.
-