Functions can be either a Method (for static Java methods) or a
MethodHandle and must be registered in the context prior to evaluation
of the expression. See the registerFunction() methods in
org.
for details.
org.springframework.expression.spel.support.StandardEvaluationContext#registerFunction(String, Method) , org.springframework.expression.spel.support.StandardEvaluationContext#registerFunction(String, MethodHandle)
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private TypedValue | Returns: the return value of the invoked Java methodthe expression evaluation state state, Method the method to invoke method)Execute a function represented as a |
| private TypedValue | Returns: the return value of the invoked Java methodthe expression evaluation state state, MethodHandle the method handle to invoke methodHandle)Execute a function represented as |
| public void | generateCode(MethodVisitor
the ASM MethodVisitor into which code should be generated mv, CodeFlow a context object with info about what is on the stack cf)Overrides org. Generate the bytecode for this node into the supplied visitor. |
| private Object[] | Returns: an array of argument values for the function callCompute the arguments to the function, they are the children of this expression node. |
| public TypedValue | getValueInternal(ExpressionState state)
Implements abstract org.
|
| public boolean | isCompilable()
Overrides org. Check whether a node can be compiled to bytecode. |
| public String | toStringAST()
Implements org. Return the string form of this AST node. |
| method | back to summary |
|---|---|
| private volatile Method method
| |
| name | back to summary |
|---|---|
| private final String name | |
| FunctionReference | back to summary |
|---|---|
| public FunctionReference(String functionName, int startPos, int endPos, SpelNodeImpl... arguments) | |
| executeFunctionViaMethod | back to summary |
|---|---|
| private TypedValue executeFunctionViaMethod(ExpressionState state, Method method) throws EvaluationException Execute a function represented as a
| |
| executeFunctionViaMethodHandle | back to summary |
|---|---|
| private TypedValue executeFunctionViaMethodHandle(ExpressionState state, MethodHandle methodHandle) throws EvaluationException Execute a function represented as Method types that take no arguments (fully bound handles or static methods
with no parameters) can use
| |
| generateCode | back to summary |
|---|---|
| public void generateCode(MethodVisitor mv, CodeFlow cf) Overrides org. Doc from org. Generate the bytecode for this node into the supplied visitor. Context info about the current expression being compiled is available in the codeflow object, e.g. including information about the type of the object currently on the stack.
| |
| getArguments | back to summary |
|---|---|
| private Object[] getArguments(ExpressionState state) throws EvaluationException Compute the arguments to the function, they are the children of this expression node.
| |
| getValueInternal | back to summary |
|---|---|
| public TypedValue getValueInternal(ExpressionState state) throws EvaluationException Implements abstract org.
| |
| isCompilable | back to summary |
|---|---|
| public boolean isCompilable() Overrides org. Doc from org. Check whether a node can be compiled to bytecode. The reasoning in each node may be different but will typically involve checking whether the exit type descriptor of the node is known and any relevant child nodes are compilable.
| |
| toStringAST | back to summary |
|---|---|
| public String toStringAST() Implements org. Doc from org. Return the string form of this AST node. | |