Enum Class Type.Kind

java.lang.Object
java.lang.Enum<Type.Kind>
jakarta.enterprise.lang.model.types.Type.Kind
All Implemented Interfaces:
Serializable, Comparable<Type.Kind>, Constable
Enclosing interface:
Type

public static enum Type.Kind extends Enum<Type.Kind>
The type kind: void, primitive, class, array, parameterized type, type variable, wildcard type
  • Enum Constant Details

    • VOID

      public static final Type.Kind VOID
      The void pseudo-type, e.g. when method returns void.
    • PRIMITIVE

      public static final Type.Kind PRIMITIVE
      A primitive type, e.g. when method returns int.
    • CLASS

      public static final Type.Kind CLASS
      A class type, e.g. when method returns String.
    • ARRAY

      public static final Type.Kind ARRAY
      An array type, e.g. when method returns int[] or String[][].
    • PARAMETERIZED_TYPE

      public static final Type.Kind PARAMETERIZED_TYPE
      A parameterized type, e.g. when method returns List<String>.
    • TYPE_VARIABLE

      public static final Type.Kind TYPE_VARIABLE
      A type variable, e.g. when method returns T and T is a type parameter of the declaring class.
    • WILDCARD_TYPE

      public static final Type.Kind WILDCARD_TYPE
      A wildcard type, e.g. when method returns List<? extends Number>. The kind of such type is PARAMETERIZED_TYPE, but the first (and only) type argument is a WILDCARD_TYPE.
  • Method Details

    • values

      public static Type.Kind[] 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 Type.Kind 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