Module com.github.rvesse.airline
Class StandardOptionParser<T>
java.lang.Object
com.github.rvesse.airline.parser.AbstractParser<T>
com.github.rvesse.airline.parser.options.AbstractOptionParser<T>
com.github.rvesse.airline.parser.options.StandardOptionParser<T>
- All Implemented Interfaces:
OptionParser<T>
An options parser that expects the name and value(s) to be white space
separated e.g.
--name value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseOptions
(org.apache.commons.collections4.iterators.PeekingIterator<String> tokens, ParseState<T> state, List<OptionMetadata> allowedOptions) Parses one/more options from the token streamMethods inherited from class com.github.rvesse.airline.parser.options.AbstractOptionParser
findOption, findOption, hasShortNamePrefix, isSeparatorOrOption, noValueForOption
Methods inherited from class com.github.rvesse.airline.parser.AbstractParser
getTypeConverter
-
Constructor Details
-
StandardOptionParser
public StandardOptionParser()
-
-
Method Details
-
parseOptions
public ParseState<T> parseOptions(org.apache.commons.collections4.iterators.PeekingIterator<String> tokens, ParseState<T> state, List<OptionMetadata> allowedOptions) Description copied from interface:OptionParser
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
-