|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<CommandLineParser.Mode>
com.android.sdklib.util.CommandLineParser.Mode
protected static enum CommandLineParser.Mode
The mode of an argument specifies the type of variable it represents, whether an extra parameter is required after the flag and how to parse it.
Enum Constant Summary | |
---|---|
BOOLEAN
Argument value is a Boolean. |
|
ENUM
Argument value is a String. |
|
INTEGER
Argument value is an Integer. |
|
STRING
Argument value is a String. |
|
STRING_ARRAY
Argument value is a List <String>. |
Method Summary | |
---|---|
abstract boolean |
needsExtra()
Returns true if this mode requires an extra parameter. |
abstract java.lang.Object |
process(CommandLineParser.Arg arg,
java.lang.String extra)
Processes the flag for this argument. |
static CommandLineParser.Mode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static CommandLineParser.Mode[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final CommandLineParser.Mode BOOLEAN
public static final CommandLineParser.Mode INTEGER
public static final CommandLineParser.Mode ENUM
public static final CommandLineParser.Mode STRING
public static final CommandLineParser.Mode STRING_ARRAY
List
<String>. Default value is an empty list.
Method Detail |
---|
public static CommandLineParser.Mode[] values()
for (CommandLineParser.Mode c : CommandLineParser.Mode.values()) System.out.println(c);
public static CommandLineParser.Mode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic abstract boolean needsExtra()
public abstract java.lang.Object process(CommandLineParser.Arg arg, java.lang.String extra)
arg
- The argument being processed.extra
- The extra parameter. Null if needsExtra()
returned false.
CommandLineParser.Accept.CONTINUE
if this argument can use multiple values and
wishes to receive more.
Or CommandLineParser.Accept.ACCEPT_AND_STOP
if this was the last value accepted by the argument.
Or CommandLineParser.Accept.REJECT_AND_STOP
if this was value was reject and the argument
stops accepting new values with no error.
Or a string in case of error.
Never returns null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |