Interface ValueExpressionParser

All Known Implementing Classes:
CachingValueExpressionDelegate, ValueExpressionDelegate

public interface ValueExpressionParser
Parses expression strings into expressions that can be evaluated. Supports parsing expression, configuration templates as well as literal strings.
Since:
3.3
Author:
Christoph Strobl, Mark Paluch
  • Method Details

    • create

      static ValueExpressionParser create()
      Creates a default parser to parse expression strings.
      Returns:
      the parser instance.
      Since:
      3.4
    • create

      static ValueExpressionParser create(ValueParserConfiguration configuration)
      Creates a new parser to parse expression strings.
      Parameters:
      configuration - the parser context configuration.
      Returns:
      the parser instance.
    • parse

      ValueExpression parse(String expressionString) throws ParseException
      Parses the expression string and return an Expression object you can use for repeated evaluation.

      Some examples:

           #{3 + 4}
           #{name.firstName}
           ${key.one}
           #{name.lastName}-${key.one}
       
      Parameters:
      expressionString - the raw expression string to parse.
      Returns:
      an evaluator for the parsed expression.
      Throws:
      ParseException - an exception occurred during parsing.