public class FunctionCall extends Object implements Expression
Constructor and Description |
---|
FunctionCall(Function function,
Expression... args)
Creates a new function call.
|
Modifier and Type | Method and Description |
---|---|
Object |
accept(ExpressionVisitor visitor)
Accepts to visit the given expression visitor.
|
Value |
evaluate()
Evaluates the expression and returns the result.
|
Expression[] |
getArguments()
Returns the arguments passed to the function.
|
Function |
getFunction()
Returns the function that is called.
|
String |
toString() |
public FunctionCall(Function function, Expression... args) throws IllegalFunctionCallException
function
- the function that is calledargs
- the arguments passed to the functionIllegalFunctionCallException
- if the arguments passed to the function did not match its parameterspublic Value evaluate() throws IllegalValueTypeException
Expression
evaluate
in interface Expression
IllegalValueTypeException
- if a value of an unexpected type was
encountered when evaluating the expressionpublic Function getFunction()
public Expression[] getArguments()
public Object accept(ExpressionVisitor visitor)
Expression
accept
in interface Expression
visitor
- the visitor