|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface Option
Annotates a function in the context class with information about the option it represents. The following option properties can be configured using this annotation:
--verbose
.-v
.exclude()
@Option (longName="verbose", shortName='v', description="Logs additional information on stderr") public void setVerbose () { ... }In this particular example the
longName
attribute is not necessary,
because the system would derive the same long name from the method name.
Optional Element Summary | |
---|---|
java.lang.String |
description
One line description for this option. |
Exclusion |
exclude
Exclusion policy for this option. |
java.lang.String |
longName
Name for a long option. |
int |
priority
Priority of this option. |
char |
shortName
Single letter name for a short option. |
int |
usageRank
Determines the order in which this option is displayed in the usage list. |
public abstract java.lang.String longName
public abstract char shortName
public abstract int priority
public abstract java.lang.String description
CLManager.getUsageMessage()
when displaying a list of available
options to the user.
public abstract int usageRank
public abstract Exclusion exclude
Exclusion.OTHER_OPTIONS
), or even stronger,
no other option or command line argument
(value Exclusion.OTHER_OPTIONS_OR_ARGUMENTS
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |