| Package | system.cli |
| Class | public class ArgumentsParser |
| Inheritance | ArgumentsParser Object |
Note : we don't want to use events for Tamarin compatibility.
Example :
my.exe -h
my.exe /?
my.exe -s -T:hello myfile.txt
my.exe myfile1.txt myfile2.txt
| Method | Defined By | ||
|---|---|---|---|
ArgumentsParser(switchSymbols:Array, caseSensitive:Boolean = false, switchChars:Array = null)
Creates a new ArgumentParser instance. | ArgumentsParser | ||
onNonSwitch(value:String):SwitchStatus
Used to display the usage string when a non switch occurs. | ArgumentsParser | ||
Used to display the usage string when a parse occurs. | ArgumentsParser | ||
onSwitch(symbol:String, value:String):SwitchStatus
Used to display the usage string when a switch occurs. | ArgumentsParser | ||
onUsage(errorInfo:String):void
Used to display the usage string when an error occurs. | ArgumentsParser | ||
parse(args:Array):Boolean
Invoked to parse the specified Array of arguments. | ArgumentsParser | ||
| ArgumentsParser | () | Constructor |
public function ArgumentsParser(switchSymbols:Array, caseSensitive:Boolean = false, switchChars:Array = null)Creates a new ArgumentParser instance.
ParametersswitchSymbols:Array — The Array representation of all switch symbols.
| |
caseSensitive:Boolean (default = false) — Indicates if the case sensitive is enabled.
| |
switchChars:Array (default = null) — The Array of all switch characters.
|
| onNonSwitch | () | method |
public function onNonSwitch(value:String):SwitchStatusUsed to display the usage string when a non switch occurs. Need to be overrided.
Parameters
value:String |
SwitchStatus |
| onParsed | () | method |
public function onParsed():SwitchStatusUsed to display the usage string when a parse occurs. Need to be overrided.
ReturnsSwitchStatus |
| onSwitch | () | method |
public function onSwitch(symbol:String, value:String):SwitchStatusUsed to display the usage string when a switch occurs. Need to be overrided.
Parameters
symbol:String | |
value:String |
SwitchStatus |
| onUsage | () | method |
public function onUsage(errorInfo:String):voidUsed to display the usage string when an error occurs. Need to be overrided.
Parameters
errorInfo:String |
| parse | () | method |
public function parse(args:Array):BooleanInvoked to parse the specified Array of arguments.
Parameters
args:Array |
Boolean |