public final class ExpressionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static org.springframework.expression.spel.support.StandardEvaluationContext |
createStandardEvaluationContext()
Used to create a context with no BeanFactory, usually in tests.
|
static org.springframework.expression.spel.support.StandardEvaluationContext |
createStandardEvaluationContext(org.springframework.beans.factory.BeanFactory beanFactory)
Obtains the context from the beanFactory if not null; emits a warning if the beanFactory
is null.
|
static File |
expressionToFile(org.springframework.expression.Expression expression,
org.springframework.expression.EvaluationContext evaluationContext,
org.springframework.messaging.Message<?> message,
String name)
|
static org.springframework.expression.Expression |
intExpression(String expression)
Return a
ValueExpression for a simple literal, otherwise
a SpelExpression . |
static org.springframework.expression.Expression |
longExpression(String expression)
Return a
ValueExpression for a simple literal, otherwise
a SpelExpression . |
public static org.springframework.expression.spel.support.StandardEvaluationContext createStandardEvaluationContext()
public static org.springframework.expression.spel.support.StandardEvaluationContext createStandardEvaluationContext(org.springframework.beans.factory.BeanFactory beanFactory)
beanFactory
- The bean factory.public static File expressionToFile(org.springframework.expression.Expression expression, org.springframework.expression.EvaluationContext evaluationContext, org.springframework.messaging.Message<?> message, String name)
expression
- the expression.evaluationContext
- the evaluation context.message
- the message (if available).name
- the name of the result of the evaluation.public static org.springframework.expression.Expression intExpression(String expression)
ValueExpression
for a simple literal, otherwise
a SpelExpression
.expression
- the expression string.public static org.springframework.expression.Expression longExpression(String expression)
ValueExpression
for a simple literal, otherwise
a SpelExpression
.expression
- the expression string.