Interface ParseResult


  • @API(status=INTERNAL,
         since="1.1")
    public interface ParseResult
    The result of attempting to parse a TagExpression.

    An instance of this type either contains a successfully parsed TagExpression or an error message describing the parse error.

    Since:
    1.1
    See Also:
    TagExpression.parseFrom(String)
    • Method Detail

      • tagExpressionOrThrow

        default TagExpression tagExpressionOrThrow​(java.util.function.Function<java.lang.String,​java.lang.RuntimeException> exceptionCreator)
        Return the parsed TagExpression or throw an exception with the contained parse error.
        Parameters:
        exceptionCreator - will be called with the error message in case this parse result contains a parse error; never null.
      • errorMessage

        default java.util.Optional<java.lang.String> errorMessage()
        Return the contained parse error message, if any.