Class ExpressionUtil

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

public class ExpressionUtil extends Object
  • Constructor Details

    • ExpressionUtil

      public ExpressionUtil()
  • Method Details

    • findVariableExpressions

      public List<String> findVariableExpressions(String text)
      Finds all variable expressions in a text and returns them as list. Example expression: "${myObject.property}".
      Parameters:
      text - the text to find expressions in.
      Returns:
      a list of expressions (including the starting "${" and trailing "}").
    • findProcessorExpressions

      public List<String> findProcessorExpressions(String text)
      Finds all processor expressions in a text and returns them as list. Example expression: "#{myObject.property}".
      Parameters:
      text - the text to find expressions in.
      Returns:
      a list of expressions (including the starting "#{" and trailing "}").
    • stripExpression

      public String stripExpression(String expression)
      Strips an expression of the leading "${" or "#{" and the trailing "}".
      Parameters:
      expression - the expression to strip.
      Returns:
      the expression without the leading "${" or "#{" and the trailing "}".