org.springframework.expression
Interface ParserContext

All Known Implementing Classes:
TemplateParserContext

public interface ParserContext

Input provided to an expression parser that can influence an expression parsing/compilation routine.

Since:
3.0
Author:
Keith Donald, Andy Clement

Field Summary
static ParserContext TEMPLATE_EXPRESSION
          The default ParserContext implementation that enables template expression parsing mode.
 
Method Summary
 java.lang.String getExpressionPrefix()
          For template expressions, returns the prefix that identifies the start of an expression block within a string.
 java.lang.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.
 

Field Detail

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 }.

See Also:
isTemplate()
Method Detail

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}
 

Returns:
true if the expression is a template, false otherwise

getExpressionPrefix

java.lang.String getExpressionPrefix()
For template expressions, returns the prefix that identifies the start of an expression block within a string. For example: "${"

Returns:
the prefix that identifies the start of an expression

getExpressionSuffix

java.lang.String getExpressionSuffix()
For template expressions, return the prefix that identifies the end of an expression block within a string. For example: "}"

Returns:
the suffix that identifies the end of an expression