Package org.apache.commons.cli.avalon
Class CLOptionDescriptor
java.lang.Object
org.apache.commons.cli.avalon.CLOptionDescriptor
Basic class describing an type of option. Typically, one creates a static
 array of 
CLOptionDescriptors, and passes it to
 CLArgsParser(String[], CLOptionDescriptor[]).- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intFlag to say this option does not take argumentsstatic final intFlag to say that the argument is optionalstatic final intFlag to say that one argument is requiredstatic final intFlag to say this option requires 2 argumentsstatic final intFlag to say this option may be repeated on the command line
- 
Constructor SummaryConstructorsConstructorDescriptionCLOptionDescriptor(String name, int flags, int id, String description) Constructor.CLOptionDescriptor(String name, int flags, int id, String description, CLOptionDescriptor[] incompatible) Constructor.
- 
Method Summary
- 
Field Details- 
ARGUMENT_REQUIREDpublic static final int ARGUMENT_REQUIREDFlag to say that one argument is required- See Also:
 
- 
ARGUMENT_OPTIONALpublic static final int ARGUMENT_OPTIONALFlag to say that the argument is optional- See Also:
 
- 
ARGUMENT_DISALLOWEDpublic static final int ARGUMENT_DISALLOWEDFlag to say this option does not take arguments- See Also:
 
- 
ARGUMENTS_REQUIRED_2public static final int ARGUMENTS_REQUIRED_2Flag to say this option requires 2 arguments- See Also:
 
- 
DUPLICATES_ALLOWEDpublic static final int DUPLICATES_ALLOWEDFlag to say this option may be repeated on the command line- See Also:
 
 
- 
- 
Constructor Details- 
CLOptionDescriptorConstructor.- Parameters:
- name- the name/long option
- flags- the flags
- id- the id/character option
- description- description of option usage
 
- 
CLOptionDescriptorpublic CLOptionDescriptor(String name, int flags, int id, String description, CLOptionDescriptor[] incompatible) Constructor.- Parameters:
- name- the name/long option
- flags- the flags
- id- the id/character option
- description- description of option usage
- incompatible- descriptors for incompatible options
 
 
- 
- 
Method Details- 
getDescriptionRetrieve textual description.- Returns:
- the description
 
- 
getFlagspublic final int getFlags()Retrieve flags about option. Flags include details such as whether it allows parameters etc.- Returns:
- the flags
 
- 
getIdpublic final int getId()Retrieve the id for option. The id is also the character if using single character options.- Returns:
- the id
 
- 
getNameRetrieve name of option which is also text for long option.- Returns:
- name/long option
 
- 
toString
 
-