|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.christopherschultz.evaluator.Expression
net.christopherschultz.evaluator.FunctionCallExpression
public class FunctionCallExpression
An Expression representing a function call.
| Constructor Summary | |
|---|---|
FunctionCallExpression(Expression functionExp,
List arguments)
Creates a new FunctionCallExpression where the function to call is determined at evaluation time. |
|
| Method Summary | |
|---|---|
void |
acceptVisitor(ExpressionVisitor visitor)
Accepts an ExpressionVisitor. |
boolean |
equals(Object o)
Returns true if the specified object is equal to
this one. |
Object |
evaluate(EvaluationContext ec)
Evaluates this Expression by evaluating all of the arguments' expressions, and then passing their resulting values to the function bound to this FunctionCallExpression's name. |
List |
getArgumentExpressions()
Gets the list of argument expressions for this FunctionCallExpression. |
Expression |
getFunctionExpression()
Gets the expression which will evaluate to the function to be called by this FunctionCallExpression. |
String |
getFunctionName()
Returns the name of the function to be called by this FunctionCallExpression, or <anonymous> if the
function will be determined at evaluation-time. |
List |
getSubExpressions()
Gets a flattened, depth-first traversal of the expressions in this Expression (including this Expression). |
int |
hashCode()
|
String |
toString()
Returns a String representation of this FunctionCallExpression. |
| Methods inherited from class net.christopherschultz.evaluator.Expression |
|---|
getParent, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FunctionCallExpression(Expression functionExp,
List arguments)
throws EvaluationException
Creates a new FunctionCallExpression where the function to call is determined at evaluation time.
EvaluationException| Method Detail |
|---|
public String getFunctionName()
<anonymous> if the
function will be determined at evaluation-time.
public Expression getFunctionExpression()
public List getArgumentExpressions()
public List getSubExpressions()
Expression
getSubExpressions in class Expressionpublic void acceptVisitor(ExpressionVisitor visitor)
Expression
acceptVisitor in class Expression
public Object evaluate(EvaluationContext ec)
throws EvaluationException
evaluate in class Expressionec - The context in which this function call should be evaluated.
EvaluationException - If there is an error evaluating any of
the argument expressions or calling the
function itself.public String toString()
toString in class Objectpublic boolean equals(Object o)
true if the specified object is equal to
this one.
equals in class Objecto - The object to test for equality.
true if the specified object is equal to
this one, false otherwise.public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||