open class SpelExpression : Expression
A SpelExpression represents a parsed (valid) expression that is ready to be evaluated in a specified context. An expression can be evaluated standalone or in a specified context. During expression evaluation the context may be asked to resolve references to types, beans, properties, and methods.
Author
Andy Clement
Author
Juergen Hoeller
Since
3.0
SpelExpression(expression: String, ast: SpelNodeImpl, configuration: SpelParserConfiguration)
Construct an expression, only used by the parser. |
open fun compileExpression(): Boolean
Perform expression compilation. This will only succeed once exit descriptors for all nodes have been determined. If the compilation fails and has failed more than 100 times the expression is no longer considered suitable for compilation. |
|
open fun getAST(): SpelNode
Return the Abstract Syntax Tree for the expression. |
|
open fun getEvaluationContext(): EvaluationContext
Return the default evaluation context that will be used if none is supplied on an evaluation call. |
|
open fun getExpressionString(): String |
|
open fun getValue(): Anyopen fun <T : Any> getValue(expectedResultType: Class<T>): Topen fun getValue(rootObject: Any): Anyopen fun <T : Any> getValue(rootObject: Any, expectedResultType: Class<T>): Topen fun getValue(context: EvaluationContext): Anyopen fun <T : Any> getValue(context: EvaluationContext, expectedResultType: Class<T>): Topen fun getValue(context: EvaluationContext, rootObject: Any): Anyopen fun <T : Any> getValue(context: EvaluationContext, rootObject: Any, expectedResultType: Class<T>): T |
|
open fun getValueType(): Class<*>open fun getValueType(rootObject: Any): Class<*>open fun getValueType(context: EvaluationContext): Class<*>open fun getValueType(context: EvaluationContext, rootObject: Any): Class<*> |
|
open fun getValueTypeDescriptor(): TypeDescriptoropen fun getValueTypeDescriptor(rootObject: Any): TypeDescriptoropen fun getValueTypeDescriptor(context: EvaluationContext): TypeDescriptoropen fun getValueTypeDescriptor(context: EvaluationContext, rootObject: Any): TypeDescriptor |
|
open fun isWritable(rootObject: Any): Booleanopen fun isWritable(context: EvaluationContext): Booleanopen fun isWritable(context: EvaluationContext, rootObject: Any): Boolean |
|
open fun revertToInterpreted(): Unit
Cause an expression to revert to being interpreted if it has been using a compiled form. It also resets the compilation attempt failure count (an expression is normally no longer considered compilable if it cannot be compiled after 100 attempts). |
|
open fun setEvaluationContext(evaluationContext: EvaluationContext): Unit
Set the evaluation context that will be used if none is specified on an evaluation call. |
|
open fun setValue(rootObject: Any, value: Any): Unitopen fun setValue(context: EvaluationContext, value: Any): Unitopen fun setValue(context: EvaluationContext, rootObject: Any, value: Any): Unit |
|
open fun toStringAST(): String
Produce a string representation of the Abstract Syntax Tree for the expression. This should ideally look like the input expression, but properly formatted since any unnecessary whitespace will have been discarded during the parse of the expression. |