Class ExpressionResolver

java.lang.Object
org.wickedsource.docxstamper.el.ExpressionResolver

public class ExpressionResolver extends Object
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

    Constructors
    Constructor
    Description
    ExpressionResolver(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 Type
    Method
    Description
    static String
    cleanExpression(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 - a StandardEvaluationContext object
      spelParserConfiguration - the configuration for the SpEL parser.
  • Method Details

    • cleanExpression

      public static String cleanExpression(String expression)
      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

      public Object resolveExpression(String expression, Object contextRoot)
      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.