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

## com.sun.javatest.tool
Class CommandParser

    java.lang.Object
      com.sun.javatest.tool.CommandParser

    public class CommandParser

extends java.lang.Object

A class to parse a series of commands, with the help of their associated command managers.

Nested Class Summary
`class` | `CommandParser.Fault` Thrown when a bad command line argument is encountered.

Constructor Summary
`CommandParser(CommandManager[] mgrs)` Create a parser to parse the commands accepted by a set of command managers.

Method Summary
`void` | `parse(java.lang.String[] args, boolean urlEncoded, CommandContext ctx)` Parse command line arguments into a series of commands.
`void` | `parse(java.lang.String[] args, CommandContext ctx)` Parse command line arguments into a series of commands.

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

Constructor Detail

### CommandParser

    public CommandParser(CommandManager[] mgrs)

  Create a parser to parse the commands accepted by a set of command managers.

  Parameters:
    `mgrs` - the command managers for the commands that can be parsed

Method Detail

### parse

    public void parse(java.lang.String[] args,
                      CommandContext ctx)
               throws CommandParser.Fault

  Parse command line arguments into a series of commands.

  Parameters:
    `args` - the args to be parsed
    `ctx` - the context in which to store the commands that are created
  Throws:
    `CommandParser.Fault` - if there are any problems with a command that is parsed, such as missing or inappropriate options

### parse

    public void parse(java.lang.String[] args,
                      boolean urlEncoded,
                      CommandContext ctx)
               throws CommandParser.Fault

  Parse command line arguments into a series of commands.

  Parameters:
    `args` - the args to be parsed
    `urlEncoded` - whether or not the args have been encoded according to the "application/x-www-form-urlencoded" MIME format.
    `ctx` - the context in which to store the commands that are created
  Throws:
    `CommandParser.Fault` - if there are any problems with a command that is parsed, such as missing or inappropriate options

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 (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.