org.apache.axis.utils
Class CLOptionDescriptor
java.lang.Object
org.apache.axis.utils.CLOptionDescriptor
public final class CLOptionDescriptor
extends java.lang.Object
Basic class describing an type of option.
Typically, one creates a static array of CLOptionDescriptor
s,
and passes it to CLArgsParser.CLArgsParser(String[], CLOptionDescriptor[])
.
- Peter Donald
- 4.0
CLOptionDescriptor(String name, int flags, int id, String description) - Constructor.
|
CLOptionDescriptor(String name, int flags, int id, String description, int[] incompatable) - Constructor.
|
ARGUMENTS_REQUIRED_2
public static final int ARGUMENTS_REQUIRED_2
Flag to say this option requires 2 arguments
- 16
ARGUMENT_DISALLOWED
public static final int ARGUMENT_DISALLOWED
Flag to say this option does not take arguments
- 8
ARGUMENT_OPTIONAL
public static final int ARGUMENT_OPTIONAL
Flag to say that the argument is optional
- 4
ARGUMENT_REQUIRED
public static final int ARGUMENT_REQUIRED
Flag to say that one argument is required
- 2
DUPLICATES_ALLOWED
public static final int DUPLICATES_ALLOWED
Flag to say this option may be repeated on the command line
- 32
CLOptionDescriptor
public CLOptionDescriptor(String name,
int flags,
int id,
String description)
Constructor.
name
- the name/long optionflags
- the flagsid
- the id/character optiondescription
- description of option usage
CLOptionDescriptor
public CLOptionDescriptor(String name,
int flags,
int id,
String description,
int[] incompatable)
Constructor.
name
- the name/long optionflags
- the flagsid
- the id/character optiondescription
- description of option usage
getDescription
public final String getDescription()
Retrieve textual description.
- the description
getFlags
public final int getFlags()
Retrieve flags about option.
Flags include details such as whether it allows parameters etc.
- the flags
getId
public final int getId()
Retrieve the id for option.
The id is also the character if using single character options.
- the id
getIncompatble
protected final int[] getIncompatble()
Use the correctly spelled getIncompatible()
instead.
getIncompatible
protected final int[] getIncompatible()
getName
public final String getName()
Retrieve name of option which is also text for long option.
- name/long option
toString
public final String toString()
Convert to String.
- the converted value to string.
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.