Package software.amazon.smithy.cli
Enum Parser.Arity
- java.lang.Object
-
- java.lang.Enum<Parser.Arity>
-
- software.amazon.smithy.cli.Parser.Arity
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Parser.Arity>
- Enclosing class:
- Parser
public static enum Parser.Arity extends java.lang.Enum<Parser.Arity>
Defines the arity of an argument.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Parser.Arity
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Parser.Arity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final Parser.Arity NONE
The argument accepts no value.
-
ONE
public static final Parser.Arity ONE
The argument accepts a single value.
-
MANY
public static final Parser.Arity MANY
The argument accepts one or more values.
-
-
Method Detail
-
values
public static Parser.Arity[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Parser.Arity c : Parser.Arity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Parser.Arity valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-