类 JsrExpressionParser
- java.lang.Object
- org.springframework.batch.core.jsr.configuration.support.JsrExpressionParser
public class JsrExpressionParser extends java.lang.Object
Support class for parsing JSR-352 expressions. The JSR-352 expression syntax, for example conditional/elvis statements need to be transformed a bit to be valid SPeL expressions.
- 从以下版本开始:
- 3.0
- 作者:
- Chris Schaefer
构造器概要
构造器 构造器 说明 JsrExpressionParser()
Creates a new instance of this expression parser without and expression resolver.JsrExpressionParser(org.springframework.beans.factory.config.BeanExpressionResolver beanExpressionResolver, org.springframework.beans.factory.config.BeanExpressionContext beanExpressionContext)
Creates a new instances of this expression parser with the provided expression resolver and context to evaluate against.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.String
parseExpression(java.lang.String expression)
Parses the provided expression, applying any transformations needed to evaluate as a SPeL expression.
构造器详细资料
JsrExpressionParser
public JsrExpressionParser()
Creates a new instance of this expression parser without and expression resolver. Creating an instance via this constructor will still parse expressions but no resolution of operators will occur as its expected the caller will.
JsrExpressionParser
public JsrExpressionParser(org.springframework.beans.factory.config.BeanExpressionResolver beanExpressionResolver, org.springframework.beans.factory.config.BeanExpressionContext beanExpressionContext)
Creates a new instances of this expression parser with the provided expression resolver and context to evaluate against.
- 参数:
beanExpressionResolver
- the expression resolver to use when resolving expressionsbeanExpressionContext
- the expression context to resolve expressions against
方法详细资料
parseExpression
public java.lang.String parseExpression(java.lang.String expression)
Parses the provided expression, applying any transformations needed to evaluate as a SPeL expression.
- 参数:
expression
- the expression to parse and transform- 返回:
- a JSR-352 transformed expression that can be evaluated by a SPeL parser