Top Description Fields Methods
org.springframework.expression

public Interface ParserContext

Known Direct Implementers
org.springframework.expression.common.TemplateParserContext

Input provided to an expression parser that can influence an expression parsing/compilation routine.
Authors
Keith Donald, Andy Clement
Since
3.0

Field Summary

Modifier and TypeField and Description
public static final ParserContext
TEMPLATE_EXPRESSION

The default ParserContext implementation that enables template expression parsing mode.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the prefix that identifies the start of an expression
getExpressionPrefix
()

For template expressions, returns the prefix that identifies the start of an expression block within a string.

public String

Returns:

the suffix that identifies the end of an expression
getExpressionSuffix
()

For template expressions, return the prefix that identifies the end of an expression block within a string.

public boolean

Returns:

true if the expression is a template, false otherwise
isTemplate
()

Whether the expression being parsed is a template.

Field Detail

TEMPLATE_EXPRESSIONback to summary
public 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

getExpressionPrefixback to summary
public String getExpressionPrefix()

For template expressions, returns the prefix that identifies the start of an expression block within a string. For example: "${"

Returns:String

the prefix that identifies the start of an expression

getExpressionSuffixback to summary
public String getExpressionSuffix()

For template expressions, return the prefix that identifies the end of an expression block within a string. For example: "}"

Returns:String

the suffix that identifies the end of an expression

isTemplateback to summary
public boolean isTemplate()

Whether 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}
Returns:boolean

true if the expression is a template, false otherwise