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

public static enum MethodSignature.ValueMechanics extends Enum<MethodSignature.ValueMechanics>
Method return type mechanics. This is a bit of an escape hatch for various behaviors which are supported by code generation.
  • Enum Constant Details

    • NORMAL

      public static final MethodSignature.ValueMechanics NORMAL
      Usual mechanics, nothing special is going on.
    • NULLIFY_EMPTY

      public static final MethodSignature.ValueMechanics NULLIFY_EMPTY
      Mechanics signaling that the method should not be returning empty collections, but rather squash tham to null.
    • NONNULL

      public static final MethodSignature.ValueMechanics NONNULL
      Mechanics signaling that the method cannot legally return null. This is primarily useful for getters, where the declaration should end up having NonNull annotation attached to return type. For setters this indicates the setter should never accept a null value.
  • Method Details

    • values

      public static MethodSignature.ValueMechanics[] 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

      public static MethodSignature.ValueMechanics valueOf(String name)
      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 name
      NullPointerException - if the argument is null