|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<CliContainerStyle>
net.sf.mmm.util.cli.api.CliContainerStyle
public enum CliContainerStyle
This enum contains the available styles for container types. A container type
is an array, Map
or Collection
.
CliStyle.containerStyle()
,
CliOption.containerStyle()
,
CliArgument.containerStyle()
Enum Constant Summary | |
---|---|
COMMA_SEPARATED
The CliOption or CliArgument may occur only once. |
|
DEFAULT
The default style that indicates a fallback to the CliStyle.containerStyle() . |
|
MULTIPLE_OCCURRENCE
The CliOption or CliArgument may occur multiple times. |
Method Summary | |
---|---|
static CliContainerStyle |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CliContainerStyle[] |
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 CliContainerStyle DEFAULT
CliStyle.containerStyle()
.
public static final CliContainerStyle MULTIPLE_OCCURRENCE
CliOption
or CliArgument
may occur multiple times. The
collection gets filled with all these values in the order of their
occurrence. This style is the default. For arguments
this style is only allowed for the last CliArgument
.Foo
with a property
private List listProperty
annotated with a
CliOption
named
--list
and
with this style via CliOption.containerStyle()
. It may also have
another boolean option named --bar
. Now we call the program
like this:
Foo --list first --bar --list "second value" --list 3So
listProperty
will be filled with a List containing
{"first", "second value", "3"}.
public static final CliContainerStyle COMMA_SEPARATED
CliOption
or CliArgument
may occur only once. Multiple
values are supplied as comma separated list. In the above example call the
program as following:
Foo --list "first,second value,3" --bar
AbstractValueConverterToContainer
Method Detail |
---|
public static CliContainerStyle[] values()
for (CliContainerStyle c : CliContainerStyle.values()) System.out.println(c);
public static CliContainerStyle valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |