public class Parser extends Object
Parser
object is used to parse the
command line and verify that the command line is CLIP compliant.Constructor and Description |
---|
Parser(String[] args,
int start,
Collection<CommandModel.ParamModel> options,
boolean ignoreUnknown)
Parse the given command line arguments
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getOperands()
Returns the list of operands.
|
ParameterMap |
getOptions()
Returns a Map with all the options.
|
String |
toString() |
public Parser(String[] args, int start, Collection<CommandModel.ParamModel> options, boolean ignoreUnknown) throws CommandValidationException
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 exceptionCommandValidationException
- if command line parsing failspublic ParameterMap getOptions()
public List<String> getOperands()
Copyright © 2018. All rights reserved.