Package org.apache.commons.cli.avalon
Class CLOption
java.lang.Object
org.apache.commons.cli.avalon.CLOption
Basic class describing an instance of option.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intValue ofCLOptionDescriptor.getId()when the option is a text argument.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor taking argument for option.CLOption(CLOptionDescriptor descriptor) Constructor taking an descriptor
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidaddArgument(String argument) Mutator of Argument property.final StringRetrieve argument to option if it takes arguments.final StringgetArgument(int index) Retrieve indexed argument to option if it takes arguments.final intGet number of arguments.final CLOptionDescriptorfinal StringtoString()Convert to String.
- 
Field Details- 
TEXT_ARGUMENTpublic static final int TEXT_ARGUMENTValue ofCLOptionDescriptor.getId()when the option is a text argument.- See Also:
 
 
- 
- 
Constructor Details- 
CLOptionConstructor taking an descriptor- Parameters:
- descriptor- the descriptor iff null, will default to a "text argument" descriptor.
 
- 
CLOptionConstructor taking argument for option.- Parameters:
- argument- the argument
 
 
- 
- 
Method Details- 
getArgumentRetrieve argument to option if it takes arguments.- Returns:
- the (first) argument
 
- 
getArgumentRetrieve indexed argument to option if it takes arguments.- Parameters:
- index- The argument index, from 0 to- getArgumentCount()-1.
- Returns:
- the argument
 
- 
getDescriptor
- 
addArgumentMutator of Argument property.- Parameters:
- argument- the argument
 
- 
getArgumentCountpublic final int getArgumentCount()Get number of arguments.- Returns:
- the number of arguments
 
- 
toStringConvert to String.
 
-