Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis.utils
Class CLArgsParser

    java.lang.Object
      org.apache.axis.utils.CLArgsParser

public final class CLArgsParser
extends 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.

Since:
  4.0
Author:
  Peter Donald

Constructor Summary
`CLArgsParser(String[] args, CLOptionDescriptor[] optionDescriptors)` Create a parser that deals with options and parses certain args.
`CLArgsParser(String[] args, CLOptionDescriptor[] optionDescriptors, ParserControl control)` Create a parser that can deal with options and parses certain args.

Method Summary
`CLOption` | `getArgumentById(int id)` Retrieve the `CLOption` with specified id, or `null` if no command line option is found.
`CLOption` | `getArgumentByName(String name)` Retrieve the `CLOption` with specified name, or `null` if no command line option is found.
`Vector` | `getArguments()` Retrieve a list of options that were parsed from command list.
`String` | `getErrorString()` Retrieve an error message that occured during parsing if one existed.
`String[]` | `getUnparsedArgs()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CLArgsParser

    public CLArgsParser(String[] args,
                        CLOptionDescriptor[] optionDescriptors,
                        ParserControl control)

  Create a parser that can deal with options and parses certain args.

### CLArgsParser

    public CLArgsParser(String[] args,
                        CLOptionDescriptor[] optionDescriptors)

  Create a parser that deals with options and parses certain args.

Method Detail

### getUnparsedArgs

    public final String[] getUnparsedArgs()

### getArguments

    public final Vector getArguments()

  Retrieve a list of options that were parsed from command list.

  Returns:
    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.

  Parameters:
    `id` - the command line option id
  Returns:
    the `CLOption` with the specified id, or `null` if no CLOption is found.
  See Also:
    `CLOption`

### getArgumentByName

    public final CLOption getArgumentByName(String name)

  Retrieve the `CLOption` with specified name, or `null` if no command line option is found.

  Parameters:
    `name` - the command line option name
  Returns:
    the `CLOption` with the specified name, or `null` if no CLOption is found.
  See Also:
    `CLOption`

### getErrorString

    public final String getErrorString()

  Retrieve an error message that occured during parsing if one existed.

  Returns:
    the error string

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.