Module com.github.rvesse.airline
Interface OptionParser<T>
-
- All Known Implementing Classes:
AbstractNameValueOptionParser
,AbstractOptionParser
,ClassicGetOptParser
,ColonSeparatedOptionParser
,GreedyClassicGetOptParser
,GreedyMaybeListValueOptionParser
,JdbcStyleOptionParser
,ListValueOptionParser
,LongGetOptParser
,MaybeListValueOptionParser
,MaybePairValueOptionParser
,StandardOptionParser
public interface OptionParser<T>
Interface for option parsers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParseState<T>
parseOptions(org.apache.commons.collections4.iterators.PeekingIterator<java.lang.String> tokens, ParseState<T> state, java.util.List<OptionMetadata> allowedOptions)
Parses one/more options from the token stream
-
-
-
Method Detail
-
parseOptions
ParseState<T> parseOptions(org.apache.commons.collections4.iterators.PeekingIterator<java.lang.String> tokens, ParseState<T> state, java.util.List<OptionMetadata> allowedOptions)
Parses one/more options from the token stream- Parameters:
tokens
- Tokensstate
- Current parser stateallowedOptions
- Allowed options at this point of the parsing- Returns:
- New parser state, may return
null
if this parser could not parse the next token as an option
-
-