org.apache.avalon.excalibur.cli
クラス CLOptionDescriptor

java.lang.Object
  |
  +--org.apache.avalon.excalibur.cli.CLOptionDescriptor

public final class CLOptionDescriptor
extends java.lang.Object

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

導入されたバージョン:
4.0
作成者:
Peter Donald

フィールドの概要
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
 
コンストラクタの概要
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.
 
メソッドの概要
 java.lang.String getDescription()
          Retrieve textual description.
 int getFlags()
          Retrieve flags about option.
 int getId()
          Retrieve the id for option.
protected  int[] getIncompatble()
          推奨されていません。 Use the correctly spelled getIncompatible() instead.
protected  int[] getIncompatible()
           
 java.lang.String getName()
          Retrieve name of option which is also text for long option.
 java.lang.String toString()
          Convert to String.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

ARGUMENT_REQUIRED

public static final int ARGUMENT_REQUIRED
Flag to say that one argument is required

ARGUMENT_OPTIONAL

public static final int ARGUMENT_OPTIONAL
Flag to say that the argument is optional

ARGUMENT_DISALLOWED

public static final int ARGUMENT_DISALLOWED
Flag to say this option does not take arguments

ARGUMENTS_REQUIRED_2

public static final int ARGUMENTS_REQUIRED_2
Flag to say this option requires 2 arguments

DUPLICATES_ALLOWED

public static final int DUPLICATES_ALLOWED
Flag to say this option may be repeated on the command line
コンストラクタの詳細

CLOptionDescriptor

public CLOptionDescriptor(java.lang.String name,
                          int flags,
                          int id,
                          java.lang.String description)
Constructor.
パラメータ:
name - the name/long option
flags - the flags
id - the id/character option
description - description of option usage

CLOptionDescriptor

public CLOptionDescriptor(java.lang.String name,
                          int flags,
                          int id,
                          java.lang.String description,
                          int[] incompatable)
Constructor.
パラメータ:
name - the name/long option
flags - the flags
id - the id/character option
description - description of option usage
メソッドの詳細

getIncompatble

protected final int[] getIncompatble()
推奨されていません。 Use the correctly spelled getIncompatible() instead.


getIncompatible

protected final int[] getIncompatible()

getDescription

public final java.lang.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

getName

public final java.lang.String getName()
Retrieve name of option which is also text for long option.
戻り値:
name/long option

toString

public final java.lang.String toString()
Convert to String.
オーバーライド:
クラス java.lang.Object 内の toString
戻り値:
the converted value to string.


"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."