Class TemplateParserContext
java.lang.Object
org.springframework.expression.common.TemplateParserContext
- All Implemented Interfaces:
- ParserContext
Configurable 
ParserContext implementation for template parsing. Expects the
expression prefix and suffix as constructor arguments.- Since:
- 3.0
- Author:
- Juergen Hoeller
- 
Field SummaryFields inherited from interface ParserContextTEMPLATE_EXPRESSION
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new TemplateParserContext with the default "#{" prefix and "}" suffix.TemplateParserContext(String expressionPrefix, String expressionSuffix) Create a new TemplateParserContext for the given prefix and suffix.
- 
Method SummaryModifier and TypeMethodDescriptionfinal StringFor template expressions, returns the prefix that identifies the start of an expression block within a string.final StringFor template expressions, returns the prefix that identifies the end of an expression block within a string.final booleanWhether the expression being parsed is a template.
- 
Constructor Details- 
TemplateParserContextpublic TemplateParserContext()Create a new TemplateParserContext with the default "#{" prefix and "}" suffix.
- 
TemplateParserContext
 
- 
- 
Method Details- 
isTemplatepublic final boolean isTemplate()Description copied from interface:ParserContextWhether the expression being parsed is a template.A template consists of literal text that can be mixed with expressions. Some examples: Some literal text Hello #{name.firstName}! #{3 + 4}- Specified by:
- isTemplatein interface- ParserContext
- Returns:
- true if the expression is a template, false otherwise
 
- 
getExpressionPrefixDescription copied from interface:ParserContextFor template expressions, returns the prefix that identifies the start of an expression block within a string. For example: "${"- Specified by:
- getExpressionPrefixin interface- ParserContext
- Returns:
- the prefix that identifies the start of an expression
 
- 
getExpressionSuffixDescription copied from interface:ParserContextFor template expressions, returns the prefix that identifies the end of an expression block within a string. For example: "}"- Specified by:
- getExpressionSuffixin interface- ParserContext
- Returns:
- the suffix that identifies the end of an expression
 
 
-