|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
@Documented
public @interface CmdOptionAn Command line option which optionally supports parameters. It can be used to annotate fields and methods as options. At most on field or method can be annotated with an zero names attribute, which means that field or method represents the main parameter .
| Optional Element Summary | |
|---|---|
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.
CmdlineParser.registerHandler(CmdOptionHandler)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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||