com.sun.enterprise.admin.cli
Class Parser

java.lang.Object
  extended by com.sun.enterprise.admin.cli.Parser

public class Parser
extends Object

The Parser object is used to parse the command line and verify that the command line is CLIP compliant.


Constructor Summary
Parser(String[] args, int start, Collection<CommandModel.ParamModel> options, boolean ignoreUnknown)
          Parse the given command line arguments
 
Method Summary
 List<String> getOperands()
          Returns the list of operands.
 ParameterMap getOptions()
          Returns a Map with all the options.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Parser

public Parser(String[] args,
              int start,
              Collection<CommandModel.ParamModel> options,
              boolean ignoreUnknown)
       throws CommandValidationException
Parse the given command line arguments

Parameters:
args - command line arguments
start - index in args to start parsing
options - the valid options to consider while parsing
ignoreUnknown - if true, unknown options are considered operands instead of generating an exception
Throws:
CommandValidationException - if command line parsing fails
Method Detail

getOptions

public ParameterMap getOptions()
Returns a Map with all the options. The Map is indexed by the long name of the option.

Returns:
options

getOperands

public List<String> getOperands()
Returns the list of operands.

Returns:
list of operands

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.