Package org.wickedsource.docxstamper.el
Class ExpressionResolver
java.lang.Object
org.wickedsource.docxstamper.el.ExpressionResolver
Resolves expressions against a given context object. Expressions can be either SpEL expressions or simple property
expressions.
- Version:
- 1.6.6
- Author:
- Joseph Verron
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionResolver(org.springframework.expression.spel.support.StandardEvaluationContext standardEvaluationContext, org.springframework.expression.spel.SpelParserConfiguration spelParserConfiguration) Creates a new ExpressionResolver with the given SpEL parser configuration. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcleanExpression(String expression) Cleans the given expression by stripping the prefix and suffix if they match any of the configured matchers.resolveExpression(String expression, Object contextRoot) Resolves the given expression against the given context object.
-
Constructor Details
-
ExpressionResolver
public ExpressionResolver(org.springframework.expression.spel.support.StandardEvaluationContext standardEvaluationContext, org.springframework.expression.spel.SpelParserConfiguration spelParserConfiguration) Creates a new ExpressionResolver with the given SpEL parser configuration.- Parameters:
standardEvaluationContext- aStandardEvaluationContextobjectspelParserConfiguration- the configuration for the SpEL parser.
-
-
Method Details
-
cleanExpression
Cleans the given expression by stripping the prefix and suffix if they match any of the configured matchers.- Parameters:
expression- the expression to clean.- Returns:
- the cleaned expression.
-
resolveExpression
Resolves the given expression against the given context object.- Parameters:
expression- the expression to resolve.contextRoot- the context object against which to resolve the expression.- Returns:
- the result of the expression evaluation.
-