Cytoscape 2.8.0 API

org.apache.commons.cli.avalon
Class CLOptionDescriptor

java.lang.Object
  extended by org.apache.commons.cli.avalon.CLOptionDescriptor

public final class CLOptionDescriptor
extends Object

Basic class describing an type of option. Typically, one creates a static array of CLOptionDescriptors, and passes it to CLArgsParser.CLArgsParser(String[], CLOptionDescriptor[]).

Version:
$Revision: 1.2 $ $Date: 2005/03/18 15:26:55 $
See Also:
CLArgsParser, CLUtil

Field Summary
static int ARGUMENT_DISALLOWED
          Flag to say this option does not take arguments
static int ARGUMENT_OPTIONAL
          Flag to say that the argument is optional
static int ARGUMENT_REQUIRED
          Flag to say that one argument is required
static int ARGUMENTS_REQUIRED_2
          Flag to say this option requires 2 arguments
static int DUPLICATES_ALLOWED
          Flag to say this option may be repeated on the command line
 
Constructor Summary
CLOptionDescriptor(String name, int flags, int id, String description)
          Constructor.
CLOptionDescriptor(String name, int flags, int id, String description, CLOptionDescriptor[] incompatible)
          Constructor.
CLOptionDescriptor(String name, int flags, int id, String description, int[] incompatible)
          Deprecated. use the version with the array of CLOptionDescriptor's
 
Method Summary
 String getDescription()
          Retrieve textual description.
 int getFlags()
          Retrieve flags about option.
 int getId()
          Retrieve the id for option.
protected  int[] getIncompatble()
          Deprecated. Use the correctly spelled getIncompatible() instead.
protected  int[] getIncompatible()
          Get the array of incompatible option ids.
 String getName()
          Retrieve name of option which is also text for long option.
 String toString()
          Convert to String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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(String name,
                          int flags,
                          int id,
                          String description)
Constructor.

Parameters:
name - the name/long option
flags - the flags
id - the id/character option
description - description of option usage

CLOptionDescriptor

public CLOptionDescriptor(String name,
                          int flags,
                          int id,
                          String description,
                          int[] incompatible)
Deprecated. use the version with the array of CLOptionDescriptor's

Constructor.

Parameters:
name - the name/long option
flags - the flags
id - the id/character option
description - description of option usage
incompatible - an array listing the ids of all incompatible options

CLOptionDescriptor

public 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
Method Detail

getIncompatble

protected final int[] getIncompatble()
Deprecated. Use the correctly spelled getIncompatible() instead.

Returns:
the array of incompatible option ids

getIncompatible

protected final int[] getIncompatible()
Get the array of incompatible option ids.

Returns:
the array of incompatible option ids

getDescription

public final 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 String getName()
Retrieve name of option which is also text for long option.

Returns:
name/long option

toString

public final String toString()
Convert to String.

Overrides:
toString in class Object
Returns:
the converted value to string.

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.