Enum Class MethodSignature.ValueMechanics
java.lang.Object
java.lang.Enum<MethodSignature.ValueMechanics>
org.opendaylight.yangtools.binding.model.api.MethodSignature.ValueMechanics
- All Implemented Interfaces:
Serializable
,Comparable<MethodSignature.ValueMechanics>
,Constable
- Enclosing interface:
MethodSignature
Method return type mechanics. This is a bit of an escape hatch for various behaviors which are supported by
code generation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMechanics signaling that the method cannot legally return null.Usual mechanics, nothing special is going on.Mechanics signaling that the method should not be returning empty collections, but rather squash tham to null. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static MethodSignature.ValueMechanics[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
Usual mechanics, nothing special is going on. -
NULLIFY_EMPTY
Mechanics signaling that the method should not be returning empty collections, but rather squash tham to null. -
NONNULL
Mechanics signaling that the method cannot legally return null. This is primarily useful for getters, where the declaration should end up havingNonNull
annotation attached to return type. For setters this indicates the setter should never accept a null value.
-
-
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
-