Enum Class ParameterType
java.lang.Object
java.lang.Enum<ParameterType>
software.amazon.smithy.rulesengine.language.syntax.parameters.ParameterType
- All Implemented Interfaces:
Serializable
,Comparable<ParameterType>
,Constable
The types that parameters can be.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ParameterType
Creates aParameterType
of a specific type from the given Node type.static ParameterType
fromNode
(StringNode node) Creates aParameterType
of a specific type from the given Node information.static ParameterType
fromShapeType
(ShapeType type) Creates aParameterType
of a specific type from the given ShapeType.static ParameterType
Creates aParameterType
of a specific type from the given parameter Type.toString()
static ParameterType
Returns the enum constant of this class with the specified name.static ParameterType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
A "string" parameter type. -
BOOLEAN
A "boolean" parameter type.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromNode
Creates aParameterType
of a specific type from the given Node information.- Parameters:
node
- the node to deserialize.- Returns:
- the created ParameterType.
- Throws:
RuleError
- when the value is not a valid ParameterType.
-
fromNode
Creates aParameterType
of a specific type from the given Node type.- Parameters:
node
- the node to deserialize.- Returns:
- the created ParameterType.
- Throws:
RuleError
- when the node would not create a valid ParameterType.
-
fromType
Creates aParameterType
of a specific type from the given parameter Type.- Parameters:
type
- the Type to create from.- Returns:
- the created ParameterType.
- Throws:
RuntimeException
- when the value would not create a valid ParameterType.
-
fromShapeType
Creates aParameterType
of a specific type from the given ShapeType.- Parameters:
type
- the ShapeType to create from.- Returns:
- the created ParameterType.
- Throws:
RuntimeException
- when the value would not create a valid ParameterType.
-
toString
- Overrides:
toString
in classEnum<ParameterType>
-