be.ugent.twijug.jclops.annotations
Annotation Type Option


@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:

For example:
 @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.
 

longName

public abstract java.lang.String longName
Name for a long option. Must consist of letters, numbers and/or dashes and must begin with a letter. If empty, the system tries to construct a long name from the name of the method which is annotated.

Default:
""

shortName

public abstract char shortName
Single letter name for a short option. Must be a single letter. If zero (the default value) the option cannot be referred to using a short name.

Default:
0

priority

public abstract int priority
Priority of this option. Options are activated in order of priority, highest priority first.

Default:
0

description

public abstract java.lang.String description
One line description for this option. This description is used by CLManager.getUsageMessage() when displaying a list of available options to the user.

Default:
""

usageRank

public abstract int usageRank
Determines the order in which this option is displayed in the usage list. The higher the usage rank, the earlier in the usage list. Default usage rank is 0.

Default:
0

exclude

public abstract Exclusion exclude
Exclusion policy for this option. Allows the user to specify that no other option should occur together with this option (value Exclusion.OTHER_OPTIONS), or even stronger, no other option or command line argument (value Exclusion.OTHER_OPTIONS_OR_ARGUMENTS)

Default:
be.ugent.twijug.jclops.annotations.Exclusion.NONE