@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
@Documented
public @interface CmdOption
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String[] |
args
The arguments (their names) supported by this option.
|
java.lang.String[] |
conflictsWith
If this option can not be used in conjunction with an specific other
option, you should declare those conflicting options here.
|
java.lang.String |
description
The description of the option.
|
java.lang.Class<? extends CmdOptionHandler> |
handler
An
CmdOptionHandler to apply the parsed option to the annotated
field or method. |
boolean |
hidden
If
true , do not show this option in the usage. |
boolean |
isHelp
Special marker, that this option is a help request.
|
int |
maxCount
The maximal allowed count this option can be specified.
|
int |
minCount
The minimal allowed count this option can be specified.
|
java.lang.String[] |
names
The names of this option.
|
java.lang.String[] |
requires
If this option is only valid in conjunction with other options, you
should declare those other options here.
|
public abstract java.lang.String[] names
public abstract java.lang.String description
public abstract java.lang.String[] args
CmdOptionHandler
to use. The
names are used in messages and the usage display.public abstract java.lang.Class<? extends CmdOptionHandler> handler
CmdOptionHandler
to apply the parsed option to the annotated
field or method. If this is not given, all handler registered for
auto-detect will by tried in order.public abstract int minCount
public abstract int maxCount
public abstract boolean isHelp
public abstract boolean hidden
true
, do not show this option in the usage.public abstract java.lang.String[] requires
public abstract java.lang.String[] conflictsWith