Modifier and Type | Field and Description |
---|---|
static String |
$0
Name for the variable referring to the first command line argument (zero
based index)
|
static String |
$1
Name for the variable referring to the second command line argument (zero
based index)
|
static String |
$2
Name for the variable referring to the third command line argument (zero
based index)
|
static String |
$3
Name for the variable referring to the fourth command line argument (zero
based index)
|
static String |
$4
Name for the variable referring to the fifth command line argument (zero
based index)
|
static String |
$5
Name for the variable referring to the sixth command line argument (zero
based index)
|
static String |
$6
Name for the variable referring to the seventh command line argument
(zero based index)
|
static String |
$7
Name for the variable referring to the eighth command line argument (zero
based index)
|
static String |
$8
Name for the variable referring to the ninth command line argument (zero
based index)
|
static String |
$9
Name for the variable referring to the tenth command line argument (zero
based index)
|
static String |
$all
Name for the variable referring to all command line arguments.
|
Modifier and Type | Method and Description |
---|---|
static String |
arg(int i)
Name for the variable referring to the
(i+1)th
command line argument (the index i is zero based). |
static int |
argIndex(String name)
Returns the zero based index of an arg variable given the name of the
variable.
|
static String |
args()
Name for the variable referring to all command line arguments.
|
static String |
argsFrom(int index)
Name for the variable referring to all command line arguments starting
from the specified
index . |
static int |
argsFromIndex(String name)
Returns the zero based start index of an args variable given the name of
the variable.
|
static boolean |
isVariable(String expression)
Returns true if and only if the given name starts with the "$" prefix.
|
public static final String $0
public static final String $1
public static final String $2
public static final String $3
public static final String $4
public static final String $5
public static final String $6
public static final String $7
public static final String $8
public static final String $9
public static final String $all
public static final String arg(int i)
(i+1)th
command line argument (the index i
is zero based).i
- zero based argument index(i+1)th
command
line argumentpublic static boolean isVariable(String expression)
expression
- the potential variable name to checkpublic static int argIndex(String name)
#arg(int)
method, it
returns -1 if the given name is not compatible with the name returned by
arg(int)
.name
- the name of the variable, such as "$0", "$1" etc.public static int argsFromIndex(String name)
#argsFrom(int)
method, it returns -1 if the given name is not compatible with the name
returned by argsFrom(int)
.name
- the name of the variable, such as "$@+1", "$@+3" etc.public static final String args()
$all
public static final String argsFrom(int index)
index
.index
- zero based index of first argument in the args list(index+1)th
command
line argument followed by all other argumentsCopyright © 2024. All rights reserved.