Class CompositeParser<T>
java.lang.Object
software.amazon.awssdk.codegen.jmespath.parser.util.CompositeParser<T>
- All Implemented Interfaces:
Parser<T>
A
Parser
that invokes a list of converters, returning the first converter that was successful. This is created
using firstTry(Parser)
and new converters are added via thenTry(Parser)
.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompositeParser
<T> Create aCompositeParser
that tries the provided parser first.static <T,
U> CompositeParser <U> Create aCompositeParser
that tries the provided parser first, converting the result of that parser using the provided function.parse
(int startPosition, int endPosition) Parse a JMESPath string between the start position (inclusive) and end position (exclusive).<S> CompositeParser
<T> Create a newCompositeParser
that tries the provided parser after all previous parsers, converting the result of that parser using the provided function.Create a newCompositeParser
that tries the provided parser after all previous parsers.
-
Method Details
-
firstTry
Create aCompositeParser
that tries the provided parser first. -
firstTry
Create aCompositeParser
that tries the provided parser first, converting the result of that parser using the provided function. -
thenTry
Create a newCompositeParser
that tries the provided parser after all previous parsers. -
thenTry
Create a newCompositeParser
that tries the provided parser after all previous parsers, converting the result of that parser using the provided function. -
parse
-