Class LocaleAwareMessageParseContext

  • All Implemented Interfaces:
    ExpressionParseContext

    public class LocaleAwareMessageParseContext
    extends java.lang.Object
    implements ExpressionParseContext
    This parse context results in expressions that only evaluate to strings, and do so in a way that respects the provided locale, as much as possible. It is meant for use with the StringParser, which builds messages that reference other things.
    • Constructor Detail

      • LocaleAwareMessageParseContext

        public LocaleAwareMessageParseContext​(ExpressionParseContext delegate,
                                              java.util.Locale locale)
    • Method Detail

      • createBoundExpression

        public Expression createBoundExpression​(java.lang.String path)
                                         throws java.lang.RuntimeException
        Description copied from interface: ExpressionParseContext
        Called to create expressions to represent bound elements, like:

         { path.to.something }
         
        Specified by:
        createBoundExpression in interface ExpressionParseContext
        Parameters:
        path - the text content inside the braces.
        Throws:
        java.lang.RuntimeException - because the CUP parser doesn't have a throws on the function that calls this inside the parser