public class Evaluation extends Object
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 and Description |
|---|
Evaluation(SimpleNode node,
Object source)
Constructs a new "get"
Evaluation from the node and source given. |
Evaluation(SimpleNode node,
Object source,
boolean setOperation)
Constructs a new
Evaluation from the node and source given. |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Evaluation child)
Adds a child to the list of children of this evaluation.
|
Throwable |
getException()
Returns the exception that occurred as a result of evaluating the
Evaluation, or null if no exception occurred.
|
Evaluation |
getFirstChild()
Returns the first child of this evaluation.
|
Evaluation |
getFirstDescendant()
Gets the first descendent.
|
Evaluation |
getLastChild()
Returns the last child of this evaluation.
|
Evaluation |
getLastDescendant()
Gets the last descendent.
|
Evaluation |
getNext()
Returns the next sibling of this evaluation.
|
SimpleNode |
getNode()
Returns the
SimpleNode for this Evaluation |
Evaluation |
getParent()
Returns the parent evaluation of this evaluation.
|
Evaluation |
getPrevious()
Returns the previous sibling of this evaluation.
|
Object |
getResult()
Returns the result of the Evaluation, or null if it was a set operation.
|
Object |
getSource()
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 |
isSetOperation()
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 |
setResult(Object value)
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 |
setSource(Object value)
Sets the source of the evaluation.
|
String |
toString()
Returns a String description of the Evaluation.
|
String |
toString(boolean compact,
boolean showChildren,
String depth)
Produces a String value for the Evaluation.
|
String |
toString(boolean compact,
String depth)
Produces a String value for the Evaluation.
|
public Evaluation(SimpleNode node, Object source)
Evaluation from the node and source given.node - a SimpleNode for this Evaluation.source - a source Object for this Evaluation.public Evaluation(SimpleNode node, Object source, boolean setOperation)
Evaluation from the node and source given.
If setOperation is true this Evaluation represents
a "set" as opposed to a "get".node - a SimpleNode for this Evaluation.source - a source Object for this Evaluation.setOperation - true to identify this Evaluation as a set operation, false to identify it as a get operation.public SimpleNode getNode()
SimpleNode for this Evaluationpublic void setNode(SimpleNode value)
value - the SimpleNode to set for this Evaluation.public Object getSource()
public void setSource(Object value)
value - the source Object to be set for this Evaluation.public boolean isSetOperation()
public void setSetOperation(boolean value)
value - true to identify this Evaluation as a set operation, false to identify it as a get operation.public Object getResult()
public void setResult(Object value)
value - the result Object for this Evaluation.public Throwable getException()
public void setException(Throwable value)
value - the Throwable exception that occurred during the evaluation of this Evaluation.public Evaluation getParent()
public Evaluation getNext()
public Evaluation getPrevious()
public Evaluation getFirstChild()
public Evaluation getLastChild()
public Evaluation getFirstDescendant()
public Evaluation getLastDescendant()
public void addChild(Evaluation child)
child - an Evaluation to add as a child to the current Evaluation.public void init(SimpleNode node, Object source, boolean setOperation)
node - a SimpleNode for this Evaluation.source - a source Object for this Evaluation.setOperation - true to identify this Evaluation as a set operation, false to identify it as a get operation.public void reset()
public String toString(boolean compact, boolean showChildren, String depth)
compact - true to generate a compact form of the description for this Evaluation, false for a full form.showChildren - true to generate descriptions for child Evaluation elements of this Evaluation.depth - prefix String to use in front of child Evaluation description output - used when showChildren is true.public String toString(boolean compact, String depth)
compact - true to generate a compact form of the description for this Evaluation, false for a full form.depth - prefix String to use in front of child Evaluation description output - used when showChildren is true.Copyright © 1997–2021 OpenSymphony. All rights reserved.