Class ExpressionUtil


  • public class ExpressionUtil
    extends Object
    • Constructor Detail

      • ExpressionUtil

        public ExpressionUtil()
    • Method Detail

      • 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 "}".