Enum GenerateEnumDirective.EnumType
- java.lang.Object
-
- java.lang.Enum<GenerateEnumDirective.EnumType>
-
- software.amazon.smithy.codegen.core.directed.GenerateEnumDirective.EnumType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GenerateEnumDirective.EnumType>
- Enclosing class:
- GenerateEnumDirective<C extends CodegenContext<S,?,?>,S>
public static enum GenerateEnumDirective.EnumType extends java.lang.Enum<GenerateEnumDirective.EnumType>
Represents the type of enum to generate. Smithy IDL 2.0 introduces actual enum shapes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GenerateEnumDirective.EnumType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static GenerateEnumDirective.EnumType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRING
public static final GenerateEnumDirective.EnumType STRING
A string shape marked with the enum trait is being generated.
-
ENUM
public static final GenerateEnumDirective.EnumType ENUM
-
-
Method Detail
-
values
public static GenerateEnumDirective.EnumType[] 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 (GenerateEnumDirective.EnumType c : GenerateEnumDirective.EnumType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GenerateEnumDirective.EnumType 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
-
-