Interface ParseResult
-
@API(status=INTERNAL, since="1.1") public interface ParseResult
The result of attempting to parse aTagExpression
.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 Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Optional<String>
errorMessage()
Return the contained parse error message, if any.default Optional<TagExpression>
tagExpression()
Return the containedTagExpression
, if any.default TagExpression
tagExpressionOrThrow(Function<String,RuntimeException> exceptionCreator)
Return the parsedTagExpression
or throw an exception with the contained parse error.
-
-
-
Method Detail
-
tagExpressionOrThrow
default TagExpression tagExpressionOrThrow(Function<String,RuntimeException> exceptionCreator)
Return the parsedTagExpression
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; nevernull
.
-
errorMessage
default Optional<String> errorMessage()
Return the contained parse error message, if any.
-
tagExpression
default Optional<TagExpression> tagExpression()
Return the containedTagExpression
, if any.
-
-