spring-framework / org.springframework.expression.spel.ast / FunctionReference

FunctionReference

open class FunctionReference : SpelNodeImpl

A function reference is of the form "#someFunction(a,b,c)". Functions may be defined in the context prior to the expression being evaluated or within the expression itself using a lambda function definition. For example: Lambda function definition in an expression: "(#max = {|x,y|$x>$y?$x:$y};max(2,3))" Calling context defined function: "#isEven(37)". Functions may also be static java methods, registered in the context prior to invocation of the expression.

Functions are very simplistic, the arguments are not part of the definition (right now), so the names must be unique.

Author
Andy Clement

Since
3.0

Constructors

<init>

FunctionReference(functionName: String, pos: Int, vararg arguments: SpelNodeImpl)

Functions

generateCode

open fun generateCode(mv: MethodVisitor, cf: CodeFlow): Unit

getValueInternal

open fun getValueInternal(state: ExpressionState): TypedValue

isCompilable

open fun isCompilable(): Boolean

toStringAST

open fun toStringAST(): String