T
- public class ClassicGetOptParser<T> extends AbstractOptionParser<T>
For example -abc
could potentially set the option -a
,
-b
and -c
however interpretation is contextual depending on
the option configuration. Say option -a
has arity of 1 then the
remainder of the token (the bc
) would be interpreted as being the
value passed to the -a
option.
Constructor and Description |
---|
ClassicGetOptParser() |
Modifier and Type | Method and Description |
---|---|
ParseState<T> |
parseOptions(org.apache.commons.collections4.iterators.PeekingIterator<String> tokens,
ParseState<T> state,
List<OptionMetadata> allowedOptions)
Parses one/more options from the token stream
|
findOption, findOption, hasShortNamePrefix
getTypeConverter
public ParseState<T> parseOptions(org.apache.commons.collections4.iterators.PeekingIterator<String> tokens, ParseState<T> state, List<OptionMetadata> allowedOptions)
OptionParser
tokens
- Tokensstate
- Current parser stateallowedOptions
- Allowed options at this point of the parsingnull
if this parser could
not parse the next token as an optionCopyright © 2012–2017. All rights reserved.