Package org.apache.axis.utils
Class CLOptionDescriptor
- java.lang.Object
-
- org.apache.axis.utils.CLOptionDescriptor
-
public final class CLOptionDescriptor extends java.lang.ObjectBasic class describing an type of option. Typically, one creates a static array ofCLOptionDescriptors, and passes it toCLArgsParser(String[], CLOptionDescriptor[]).- Since:
- 4.0
- Author:
- Peter Donald
-
-
Field Summary
Fields Modifier and Type Field Description static intARGUMENT_DISALLOWEDFlag to say this option does not take argumentsstatic intARGUMENT_OPTIONALFlag to say that the argument is optionalstatic intARGUMENT_REQUIREDFlag to say that one argument is requiredstatic intARGUMENTS_REQUIRED_2Flag to say this option requires 2 argumentsstatic intDUPLICATES_ALLOWEDFlag to say this option may be repeated on the command line
-
Constructor Summary
Constructors Constructor Description CLOptionDescriptor(java.lang.String name, int flags, int id, java.lang.String description)Constructor.CLOptionDescriptor(java.lang.String name, int flags, int id, java.lang.String description, int[] incompatable)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetDescription()Retrieve textual description.intgetFlags()Retrieve flags about option.intgetId()Retrieve the id for option.protected int[]getIncompatble()Deprecated.Use the correctly spelledgetIncompatible()instead.protected int[]getIncompatible()java.lang.StringgetName()Retrieve name of option which is also text for long option.java.lang.StringtoString()Convert to String.
-
-
-
Field Detail
-
ARGUMENT_REQUIRED
public static final int ARGUMENT_REQUIRED
Flag to say that one argument is required- See Also:
- Constant Field Values
-
ARGUMENT_OPTIONAL
public static final int ARGUMENT_OPTIONAL
Flag to say that the argument is optional- See Also:
- Constant Field Values
-
ARGUMENT_DISALLOWED
public static final int ARGUMENT_DISALLOWED
Flag to say this option does not take arguments- See Also:
- Constant Field Values
-
ARGUMENTS_REQUIRED_2
public static final int ARGUMENTS_REQUIRED_2
Flag to say this option requires 2 arguments- See Also:
- Constant Field Values
-
DUPLICATES_ALLOWED
public static final int DUPLICATES_ALLOWED
Flag to say this option may be repeated on the command line- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CLOptionDescriptor
public CLOptionDescriptor(java.lang.String name, int flags, int id, java.lang.String description)Constructor.- Parameters:
name- the name/long optionflags- the flagsid- the id/character optiondescription- description of option usage
-
CLOptionDescriptor
public CLOptionDescriptor(java.lang.String name, int flags, int id, java.lang.String description, int[] incompatable)Constructor.- Parameters:
name- the name/long optionflags- the flagsid- the id/character optiondescription- description of option usage
-
-
Method Detail
-
getIncompatble
protected final int[] getIncompatble()
Deprecated.Use the correctly spelledgetIncompatible()instead.
-
getIncompatible
protected final int[] getIncompatible()
-
getDescription
public final java.lang.String 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
public final java.lang.String getName()
Retrieve name of option which is also text for long option.- Returns:
- name/long option
-
toString
public final java.lang.String toString()
Convert to String.- Overrides:
toStringin classjava.lang.Object- Returns:
- the converted value to string.
-
-