Enum Type.Kind

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Type.Kind>
    Enclosing class:
    Type

    public static enum Type.Kind
    extends java.lang.Enum<Type.Kind>
    Represents a "kind" of Type.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ARRAY
      A Java array
      CLASS
      A Java class, interface, or annotation
      PARAMETERIZED_TYPE
      A generic parameterized type
      PRIMITIVE
      A Java primitive (boolean, byte, short, char, int, long, float, double)
      TYPE_VARIABLE
      A resolved generic type parameter or type argument
      TYPE_VARIABLE_REFERENCE
      A reference to a resolved type variable occuring in the bound of a recursive type parameter
      UNRESOLVED_TYPE_VARIABLE
      An unresolved type parameter or argument.
      VOID
      Used to designate a Java method that returns nothing
      WILDCARD_TYPE
      A generic wildcard type
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Kind()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Type.Kind fromOrdinal​(int ordinal)  
      static Type.Kind valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Type.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • CLASS

        public static final Type.Kind CLASS
        A Java class, interface, or annotation
      • ARRAY

        public static final Type.Kind ARRAY
        A Java array
      • PRIMITIVE

        public static final Type.Kind PRIMITIVE
        A Java primitive (boolean, byte, short, char, int, long, float, double)
      • VOID

        public static final Type.Kind VOID
        Used to designate a Java method that returns nothing
      • TYPE_VARIABLE

        public static final Type.Kind TYPE_VARIABLE
        A resolved generic type parameter or type argument
      • UNRESOLVED_TYPE_VARIABLE

        public static final Type.Kind UNRESOLVED_TYPE_VARIABLE
        An unresolved type parameter or argument. This is merely a placeholder which occurs during an error condition or incomplete processing. In most cases, it need not be dealt with.
      • WILDCARD_TYPE

        public static final Type.Kind WILDCARD_TYPE
        A generic wildcard type
      • PARAMETERIZED_TYPE

        public static final Type.Kind PARAMETERIZED_TYPE
        A generic parameterized type
      • TYPE_VARIABLE_REFERENCE

        public static final Type.Kind TYPE_VARIABLE_REFERENCE
        A reference to a resolved type variable occuring in the bound of a recursive type parameter
    • Constructor Detail

      • Kind

        private Kind()
    • Method Detail

      • values

        public static Type.Kind[] 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 (Type.Kind c : Type.Kind.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Type.Kind 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 name
        java.lang.NullPointerException - if the argument is null
      • fromOrdinal

        public static Type.Kind fromOrdinal​(int ordinal)