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

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

public final class CLArgsParser
extends java.lang.Object

Parser for command line arguments. This parses command lines according to the standard (?) of GNU utilities. Note: This is still used in 1.1 libraries so do not add 1.2+ dependencies.

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

コンストラクタの概要
CLArgsParser(java.lang.String[] args, CLOptionDescriptor[] optionDescriptors)
          Create a parser that deals with options and parses certain args.
CLArgsParser(java.lang.String[] args, CLOptionDescriptor[] optionDescriptors, ParserControl control)
          Create a parser that can deal with options and parses certain args.
 
メソッドの概要
 CLOption getArgumentById(int id)
          Retrieve the CLOption with specified id, or null if no command line option is found.
 CLOption getArgumentByName(java.lang.String name)
          Retrieve the CLOption with specified name, or null if no command line option is found.
 java.util.Vector getArguments()
          Retrieve a list of options that were parsed from command list.
 java.lang.String getErrorString()
          Retrieve an error message that occured during parsing if one existed.
 java.lang.String[] getUnparsedArgs()
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

CLArgsParser

public CLArgsParser(java.lang.String[] args,
                    CLOptionDescriptor[] optionDescriptors,
                    ParserControl control)
Create a parser that can deal with options and parses certain args.
パラメータ:
args[] - the args, typically that passed to the public static void main(String[] args) method.
optionDescriptors[] - the option descriptors

CLArgsParser

public CLArgsParser(java.lang.String[] args,
                    CLOptionDescriptor[] optionDescriptors)
Create a parser that deals with options and parses certain args.
パラメータ:
args[] - the args
optionDescriptors[] - the option descriptors
メソッドの詳細

getUnparsedArgs

public final java.lang.String[] getUnparsedArgs()

getArguments

public final java.util.Vector getArguments()
Retrieve a list of options that were parsed from command list.
戻り値:
the list of options

getArgumentById

public final CLOption getArgumentById(int id)
Retrieve the CLOption with specified id, or null if no command line option is found.
パラメータ:
id - the command line option id
戻り値:
the CLOption) with the specified id, or null if no CLOption is found.
関連項目:
CLOption

getArgumentByName

public final CLOption getArgumentByName(java.lang.String name)
Retrieve the CLOption with specified name, or null if no command line option is found.
パラメータ:
name - the command line option name
戻り値:
the CLOption) with the specified name, or null if no CLOption is found.
関連項目:
CLOption

getErrorString

public final java.lang.String getErrorString()
Retrieve an error message that occured during parsing if one existed.
戻り値:
the error string


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