Class StateContextExpressionMethods
java.lang.Object
org.springframework.statemachine.support.StateContextExpressionMethods
Helper class to work with a spel expressions and
StateContext.-
Constructor Summary
ConstructorsConstructorDescriptionStateContextExpressionMethods(org.springframework.expression.spel.support.StandardEvaluationContext evaluationContext) Instantiates a new state context expression methods with aStandardEvaluationContext. -
Method Summary
Modifier and TypeMethodDescription<T> TgetValue(org.springframework.expression.Expression expression, StateContext<?, ?> stateContext, Class<T> desiredResultType) Gets the value.
-
Constructor Details
-
StateContextExpressionMethods
public StateContextExpressionMethods(org.springframework.expression.spel.support.StandardEvaluationContext evaluationContext) Instantiates a new state context expression methods with aStandardEvaluationContext.- Parameters:
evaluationContext- the spel evaluation context
-
-
Method Details
-
getValue
public <T> T getValue(org.springframework.expression.Expression expression, StateContext<?, ?> stateContext, Class<T> desiredResultType) throws org.springframework.expression.EvaluationExceptionGets the value.- Type Parameters:
T- the generic type- Parameters:
expression- the expressionstateContext- the state contextdesiredResultType- the desired result type- Returns:
- the value
- Throws:
org.springframework.expression.EvaluationException- the evaluation exception
-