Package org.apache.axis.utils
Class CLOptionDescriptor
java.lang.Object
org.apache.axis.utils.CLOptionDescriptor
Basic class describing an type of option.
Typically, one creates a static array of
CLOptionDescriptor
s,
and passes it to CLArgsParser(String[], CLOptionDescriptor[])
.- Since:
- 4.0
- Author:
- Peter Donald
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Flag to say this option does not take argumentsstatic final int
Flag to say that the argument is optionalstatic final int
Flag to say that one argument is requiredstatic final int
Flag to say this option requires 2 argumentsstatic final int
Flag to say this option may be repeated on the command line -
Constructor Summary
ConstructorsConstructorDescriptionCLOptionDescriptor
(String name, int flags, int id, String description) Constructor.CLOptionDescriptor
(String name, int flags, int id, String description, int[] incompatable) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Retrieve textual description.final int
getFlags()
Retrieve flags about option.final int
getId()
Retrieve the id for option.protected final int[]
Deprecated.protected final int[]
final String
getName()
Retrieve name of option which is also text for long option.final String
toString()
Convert to String.
-
Field Details
-
ARGUMENT_REQUIRED
public static final int ARGUMENT_REQUIREDFlag to say that one argument is required- See Also:
-
ARGUMENT_OPTIONAL
public static final int ARGUMENT_OPTIONALFlag to say that the argument is optional- See Also:
-
ARGUMENT_DISALLOWED
public static final int ARGUMENT_DISALLOWEDFlag to say this option does not take arguments- See Also:
-
ARGUMENTS_REQUIRED_2
public static final int ARGUMENTS_REQUIRED_2Flag to say this option requires 2 arguments- See Also:
-
DUPLICATES_ALLOWED
public static final int DUPLICATES_ALLOWEDFlag to say this option may be repeated on the command line- See Also:
-
-
Constructor Details
-
CLOptionDescriptor
Constructor.- Parameters:
name
- the name/long optionflags
- the flagsid
- the id/character optiondescription
- description of option usage
-
CLOptionDescriptor
Constructor.- Parameters:
name
- the name/long optionflags
- the flagsid
- the id/character optiondescription
- description of option usage
-
-
Method Details
-
getIncompatble
protected final int[] getIncompatble()Deprecated.Use the correctly spelledgetIncompatible()
instead. -
getIncompatible
protected final int[] getIncompatible() -
getDescription
Retrieve textual description.- Returns:
- the description
-
getFlags
public final int getFlags()Retrieve flags about option. Flags include details such as whether it allows parameters etc.- Returns:
- the flags
-
getId
public final int getId()Retrieve the id for option. The id is also the character if using single character options.- Returns:
- the id
-
getName
Retrieve name of option which is also text for long option.- Returns:
- name/long option
-
toString
Convert to String.
-
getIncompatible()
instead.