public class ExpressionFunction extends java.lang.Object implements Function
ASTPtRootNode| Red (neuendor) |
| Yellow (neuendor) |
| Constructor and Description |
|---|
ExpressionFunction(java.util.List argumentNames,
Type[] argumentTypes,
ASTPtRootNode exprRoot)
Construct a function closure that encapsulates an expression tree.
|
| Modifier and Type | Method and Description |
|---|---|
Token |
apply(Token[] arguments)
Apply the function to the list of arguments, which are tokens.
|
int |
getNumberOfArguments()
Return the number of arguments of the function.
|
boolean |
isCongruent(Function function)
Return true if this function is congruent to the given
function.
|
java.lang.String |
toString()
Return a string representation of this function.
|
public ExpressionFunction(java.util.List argumentNames,
Type[] argumentTypes,
ASTPtRootNode exprRoot)
argumentNames - The names of the arguments.argumentTypes - The types of the arguments.exprRoot - The Expression tree that describes the function.public Token apply(Token[] arguments) throws IllegalActionException
apply in interface Functionarguments - The list of arguments.IllegalActionException - If thrown during evaluating
the function.public int getNumberOfArguments()
getNumberOfArguments in interface Functionpublic boolean isCongruent(Function function)
isCongruent in interface Functionfunction - The function to check congruency against.