java.lang.Object | |
↳ | org.springframework.expression.spel.standard.SpelExpression |
A SpelExpressions 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, methods.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct an expression, only used by the parser.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the default evaluation context that will be used if none is supplied on an evaluation call
| |||||||||||
Returns the original string used to create this expression, unmodified.
| |||||||||||
Evaluate this expression against the specified root object
| |||||||||||
Evaluate the expression in the default context against the specified root object.
| |||||||||||
Evaluate the expression in the default context.
| |||||||||||
Evaluate this expression in the provided context and return the result of evaluation, but use
the supplied root context as an override for any default root object specified in the context.
| |||||||||||
Evaluate the expression in a specified context which can resolve references to properties, methods, types, etc -
the type of the evaluation result is expected to be of a particular class and an exception will be thrown if it
is not and cannot be converted to that type.
| |||||||||||
Evaluate the expression in a specified context which can resolve references to properties, methods, types, etc -
the type of the evaluation result is expected to be of a particular class and an exception will be thrown if it
is not and cannot be converted to that type.
| |||||||||||
Evaluate this expression in the default standard context.
| |||||||||||
Evaluate this expression in the provided context and return the result of evaluation.
| |||||||||||
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method using the default context. | |||||||||||
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method for the given context. | |||||||||||
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method using the default context. | |||||||||||
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method for the given context. | |||||||||||
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method using the default context. | |||||||||||
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object) method for
the given context. | |||||||||||
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method for the given context. | |||||||||||
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method using the default context. | |||||||||||
Determine if an expression can be written to, i.e.
| |||||||||||
Determine if an expression can be written to, i.e.
| |||||||||||
Determine if an expression can be written to, i.e.
| |||||||||||
Set the evaluation context that will be used if none is specified on an evaluation call.
| |||||||||||
Set this expression in the provided context to the value provided.
| |||||||||||
Set this expression in the provided context to the value provided.
| |||||||||||
Set this expression in the provided context to the value provided.
| |||||||||||
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.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.expression.Expression
|
Construct an expression, only used by the parser.
Return the default evaluation context that will be used if none is supplied on an evaluation call
Returns the original string used to create this expression, unmodified.
Evaluate this expression against the specified root object
rootObject | the root object against which properties/etc will be resolved |
---|
EvaluationException |
---|
Evaluate the expression in the default context against the specified root object. If the result of the evaluation does not match (and cannot be converted to) the expected result type then an exception will be returned.
rootObject | the root object against which properties/etc will be resolved |
---|---|
expectedResultType | the class the caller would like the result to be |
EvaluationException |
---|
Evaluate the expression in the default context. If the result of the evaluation does not match (and cannot be converted to) the expected result type then an exception will be returned.
expectedResultType | the class the caller would like the result to be |
---|
EvaluationException |
---|
Evaluate this expression in the provided context and return the result of evaluation, but use the supplied root context as an override for any default root object specified in the context.
context | the context in which to evaluate the expression |
---|---|
rootObject | the root object against which properties/etc will be resolved |
EvaluationException |
---|
Evaluate the expression in a specified context which can resolve references to properties, methods, types, etc - the type of the evaluation result is expected to be of a particular class and an exception will be thrown if it is not and cannot be converted to that type. The supplied root object overrides any default specified on the supplied context.
context | the context in which to evaluate the expression |
---|---|
rootObject | the root object against which properties/etc will be resolved |
expectedResultType | the class the caller would like the result to be |
EvaluationException |
---|
Evaluate the expression in a specified context which can resolve references to properties, methods, types, etc - the type of the evaluation result is expected to be of a particular class and an exception will be thrown if it is not and cannot be converted to that type.
context | the context in which to evaluate the expression |
---|---|
expectedResultType | the class the caller would like the result to be |
EvaluationException |
---|
Evaluate this expression in the default standard context.
EvaluationException |
---|
Evaluate this expression in the provided context and return the result of evaluation.
context | the context in which to evaluate the expression |
---|
EvaluationException |
---|
Returns the most general type that can be passed to the setValue(EvaluationContext, Object)
method using the default context.
rootObject | the root object against which to evaluate the expression |
---|
EvaluationException |
---|
Returns the most general type that can be passed to the setValue(EvaluationContext, Object)
method for the given context.
context | the context in which to evaluate the expression |
---|
EvaluationException |
---|
Returns the most general type that can be passed to the setValue(EvaluationContext, Object)
method using the default context.
EvaluationException |
---|
Returns the most general type that can be passed to the setValue(EvaluationContext, Object)
method for the given context. The supplied root object overrides any specified in the context.
context | the context in which to evaluate the expression |
---|---|
rootObject | the root object against which to evaluate the expression |
EvaluationException |
---|
Returns the most general type that can be passed to the setValue(EvaluationContext, Object)
method using the default context.
EvaluationException |
---|
Returns the most general type that can be passed to the setValue(EvaluationContext, Object)
method for
the given context. The supplied root object overrides any specified in the context.
context | the context in which to evaluate the expression |
---|---|
rootObject | the root object against which to evaluate the expression |
EvaluationException |
---|
Returns the most general type that can be passed to the setValue(EvaluationContext, Object)
method for the given context.
context | the context in which to evaluate the expression |
---|
EvaluationException |
---|
Returns the most general type that can be passed to the setValue(EvaluationContext, Object)
method using the default context.
rootObject | the root object against which to evaluate the expression |
---|
EvaluationException |
---|
Determine if an expression can be written to, i.e. setValue() can be called.
rootObject | the root object against which to evaluate the expression |
---|
EvaluationException |
---|
Determine if an expression can be written to, i.e. setValue() can be called.
context | the context in which the expression should be checked |
---|
EvaluationException |
---|
Determine if an expression can be written to, i.e. setValue() can be called. The supplied root object overrides any specified in the context.
context | the context in which the expression should be checked |
---|---|
rootObject | the root object against which to evaluate the expression |
EvaluationException |
---|
Set the evaluation context that will be used if none is specified on an evaluation call.
context | an evaluation context |
---|
Set this expression in the provided context to the value provided.
context | the context in which to set the value of the expression |
---|---|
value | the new value |
EvaluationException |
---|
Set this expression in the provided context to the value provided. The supplied root object overrides any specified in the context.
context | the context in which to set the value of the expression |
---|---|
rootObject | the root object against which to evaluate the expression |
value | the new value |
EvaluationException |
---|
Set this expression in the provided context to the value provided.
rootObject | the root object against which to evaluate the expression |
---|---|
value | the new value |
EvaluationException |
---|
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.