接口 ParserContext
- 所有已知实现类:
TemplateParserContext
public interface ParserContext
Input provided to an expression parser that can influence an expression parsing/compilation routine.- 从以下版本开始:
- 3.0
- 作者:
- Keith Donald, Andy Clement
字段概要
字段 修饰符和类型 字段 说明 static ParserContext
TEMPLATE_EXPRESSION
The default ParserContext implementation that enables template expression parsing mode.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 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.
字段详细资料
TEMPLATE_EXPRESSION
static final ParserContext TEMPLATE_EXPRESSION
The default ParserContext implementation that enables template expression parsing mode. The expression prefix is "#{" and the expression suffix is "}".- 另请参阅:
isTemplate()
方法详细资料
isTemplate
boolean isTemplate()
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}
- 返回:
- true if the expression is a template, false otherwise
getExpressionPrefix
String getExpressionPrefix()
For template expressions, returns the prefix that identifies the start of an expression block within a string. For example: "${"- 返回:
- the prefix that identifies the start of an expression
getExpressionSuffix
String getExpressionSuffix()
For template expressions, return the prefix that identifies the end of an expression block within a string. For example: "}"- 返回:
- the suffix that identifies the end of an expression