类 TemplateParserContext
- java.lang.Object
- org.springframework.expression.common.TemplateParserContext
- 所有已实现的接口:
ParserContext
public class TemplateParserContext extends Object implements ParserContext
ConfigurableParserContext
implementation for template parsing. Expects the expression prefix and suffix as constructor arguments.- 从以下版本开始:
- 3.0
- 作者:
- Juergen Hoeller
字段概要
从接口继承的字段 org.springframework.expression.ParserContext
TEMPLATE_EXPRESSION
构造器概要
构造器 构造器 说明 TemplateParserContext()
Create a new TemplateParserContext with the default "#{" prefix and "}" suffix.TemplateParserContext(String expressionPrefix, String expressionSuffix)
Create a new TemplateParserContext for the given prefix and suffix.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getExpressionPrefix()
For template expressions, returns the prefix that identifies the start of an expression block within a string.String
getExpressionSuffix()
For template expressions, return the prefix that identifies the end of an expression block within a string.boolean
isTemplate()
Whether or not the expression being parsed is a template.
构造器详细资料
TemplateParserContext
public TemplateParserContext()
Create a new TemplateParserContext with the default "#{" prefix and "}" suffix.
TemplateParserContext
public TemplateParserContext(String expressionPrefix, String expressionSuffix)
Create a new TemplateParserContext for the given prefix and suffix.- 参数:
expressionPrefix
- the expression prefix to useexpressionSuffix
- the expression suffix to use
方法详细资料
isTemplate
public final boolean isTemplate()
从接口复制的说明:ParserContext
Whether or not the expression being parsed is a template. A template expression consists of literal text that can be mixed with evaluatable blocks. Some examples:Some literal text Hello #{name.firstName}! #{3 + 4}
- 指定者:
isTemplate
在接口中ParserContext
- 返回:
- true if the expression is a template, false otherwise
getExpressionPrefix
public final String getExpressionPrefix()
从接口复制的说明:ParserContext
For template expressions, returns the prefix that identifies the start of an expression block within a string. For example: "${"- 指定者:
getExpressionPrefix
在接口中ParserContext
- 返回:
- the prefix that identifies the start of an expression
getExpressionSuffix
public final String getExpressionSuffix()
从接口复制的说明:ParserContext
For template expressions, return the prefix that identifies the end of an expression block within a string. For example: "}"- 指定者:
getExpressionSuffix
在接口中ParserContext
- 返回:
- the suffix that identifies the end of an expression