public class ProxyOptionHandler extends org.kohsuke.args4j.spi.OptionHandler<Object>
ProxyOptionHandler
allows options to have associated options.
For example, an enum option might have different options depending
of its value.Constructor and Description |
---|
ProxyOptionHandler(org.kohsuke.args4j.CmdLineParser parser,
org.kohsuke.args4j.OptionDef option,
org.kohsuke.args4j.spi.Setter<? super Object> setter)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Field |
getDeclaredField(Class<?> clz,
String name) |
String |
getDefaultMetaVariable() |
int |
parseArguments(org.kohsuke.args4j.spi.Parameters params) |
protected void |
setObjectField(Object bean,
Field field,
Object obj) |
public ProxyOptionHandler(org.kohsuke.args4j.CmdLineParser parser, org.kohsuke.args4j.OptionDef option, org.kohsuke.args4j.spi.Setter<? super Object> setter) throws org.kohsuke.args4j.CmdLineException
parser
- the parseroption
- the option definitionsetter
- the setterCmdLineException
public String getDefaultMetaVariable()
getDefaultMetaVariable
in class org.kohsuke.args4j.spi.OptionHandler<Object>
public int parseArguments(org.kohsuke.args4j.spi.Parameters params) throws org.kohsuke.args4j.CmdLineException
parseArguments
in class org.kohsuke.args4j.spi.OptionHandler<Object>
org.kohsuke.args4j.CmdLineException
protected void setObjectField(Object bean, Field field, Object obj) throws IllegalArgumentException, IllegalAccessException
protected Field getDeclaredField(Class<?> clz, String name) throws NoSuchFieldException
NoSuchFieldException