public abstract class DelimitedOptionHandler<T> extends OptionHandler<T>
OptionHandler implementation that takes a single value to the option,
which is then gets split into individual tokens by looking at a fixed delimiter.
This class is marked as abstract even though it has no abstract method,
to signify the fact that the class by itself cannot be used in Option.handler()
due to the extra argument that it takes.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
delimiter |
protected OneArgumentOptionHandler<? extends T> |
individualOptionHandler |
option, owner, setter| Constructor and Description |
|---|
DelimitedOptionHandler(CmdLineParser parser,
OptionDef option,
Setter<? super T> setter,
java.lang.String delimiter,
OneArgumentOptionHandler<? extends T> individualOptionHandler) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDefaultMetaVariable()
Gets the default meta variable name used to print the usage screen.
|
int |
parseArguments(Parameters params)
Called if the option that this owner recognizes is found.
|
getMetaVariable, getNameAndMetaprotected final java.lang.String delimiter
protected final OneArgumentOptionHandler<? extends T> individualOptionHandler
public DelimitedOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super T> setter, java.lang.String delimiter, OneArgumentOptionHandler<? extends T> individualOptionHandler)
public int parseArguments(Parameters params) throws CmdLineException
OptionHandlerparseArguments in class OptionHandler<T>params - The rest of the arguments. This method can use this
object to access the arguments of the option if necessary.
The object is valid only during the method call.CmdLineExceptionpublic java.lang.String getDefaultMetaVariable()
OptionHandlergetDefaultMetaVariable in class OptionHandler<T>Copyright © 2003-2013 Kohsuke Kawaguchi. All Rights Reserved.