|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.binding.expression.support.FluentParserContext
public class FluentParserContext
Default implementation of the ParserContext interface that has a fluent API for building parser context attributes.
Constructor Summary | |
---|---|
FluentParserContext()
Create a new parser context, initially with all context attributes as null. |
Method Summary | |
---|---|
FluentParserContext |
evaluate(java.lang.Class<?> contextType)
Configure the evaluationContextType attribute with the value provided. |
FluentParserContext |
expectResult(java.lang.Class<?> resultType)
Configure the expectedEvaluationResult attribute with the value provided. |
java.lang.Class<?> |
getEvaluationContextType()
Returns the type of context object the parsed expression will evaluate in. |
java.lang.Class<?> |
getExpectedEvaluationResultType()
Returns the expected type of object returned from evaluating the parsed expression. |
ExpressionVariable[] |
getExpressionVariables()
Returns additional expression variables or aliases that can be referenced during expression evaluation. |
boolean |
isTemplate()
Whether or not the expression being parsed is a template. |
FluentParserContext |
template()
Sets a flag indicating the expression to parse is a template. |
FluentParserContext |
variable(ExpressionVariable variable)
Add an expression variable that can be referenced by the expression. |
FluentParserContext |
variables(ExpressionVariable... variables)
Add an array of expression variables that can be referenced by the expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FluentParserContext()
evaluate(Class)
,
expectResult(Class)
,
variable(ExpressionVariable)
,
template()
Method Detail |
---|
public java.lang.Class<?> getEvaluationContextType()
ParserContext
getEvaluationContextType
in interface ParserContext
public java.lang.Class<?> getExpectedEvaluationResultType()
ParserContext
getExpectedEvaluationResultType
in interface ParserContext
public ExpressionVariable[] getExpressionVariables()
ParserContext
getExpressionVariables
in interface ParserContext
public boolean isTemplate()
ParserContext
Some literal text Hello #{name.firstName}! #{3 + 4}
isTemplate
in interface ParserContext
public FluentParserContext evaluate(java.lang.Class<?> contextType)
contextType
- the type of context object the parsed expression will evaluate in
public FluentParserContext expectResult(java.lang.Class<?> resultType)
resultType
- the type of result object the parsed expression should return when evaluated
public FluentParserContext variable(ExpressionVariable variable)
variable
- the expression variable
public FluentParserContext variables(ExpressionVariable... variables)
variables
- the expression variables
public FluentParserContext template()
|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |