Package com.sun.enterprise.admin.cli
Class Parser
- java.lang.Object
-
- com.sun.enterprise.admin.cli.Parser
-
public class Parser extends Object
TheParser
object is used to parse the command line and verify that the command line is CLIP compliant.
-
-
Constructor Summary
Constructors Constructor Description Parser(String[] args, int start, Collection<CommandModel.ParamModel> options, boolean ignoreUnknown)
Parse the given command line arguments
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getOperands()
Returns the list of operands.ParameterMap
getOptions()
Returns a Map with all the options.String
toString()
-
-
-
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 argumentsstart
- index in args to start parsingoptions
- the valid options to consider while parsingignoreUnknown
- 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
-
-