Enum JavaType.Kind

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

    public static enum JavaType.Kind
    extends java.lang.Enum<JavaType.Kind>
    The kind of Java type
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CLASS
      The type kind presents Java Class
      GENERIC_ARRAY_TYPE
      The type kind presents Java GenericArrayType
      PARAMETERIZED_TYPE
      The type kind presents Java ParameterizedType
      TYPE_VARIABLE
      The type kind presents Java TypeVariable
      UNKNOWN
      The unknown type kind
      WILDCARD_TYPE
      The type kind presents Java WildcardType
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.reflect.Type[] getGenericTypes​(JavaType javaType)  
      java.lang.reflect.Type[] getInterfaces​(java.lang.reflect.Type type)  
      java.lang.reflect.Type getRawType​(java.lang.reflect.Type type)
      Get the raw type from the specified type
      java.lang.reflect.Type getSuperType​(java.lang.reflect.Type type)
      Get the super type from the specified type
      static JavaType.Kind valueOf​(java.lang.reflect.Type type)
      Returns the enum constant of this type with the specified name.
      static JavaType.Kind valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static JavaType.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 JavaType.Kind CLASS
        The type kind presents Java Class
      • PARAMETERIZED_TYPE

        public static final JavaType.Kind PARAMETERIZED_TYPE
        The type kind presents Java ParameterizedType
      • TYPE_VARIABLE

        public static final JavaType.Kind TYPE_VARIABLE
        The type kind presents Java TypeVariable
      • WILDCARD_TYPE

        public static final JavaType.Kind WILDCARD_TYPE
        The type kind presents Java WildcardType
      • GENERIC_ARRAY_TYPE

        public static final JavaType.Kind GENERIC_ARRAY_TYPE
        The type kind presents Java GenericArrayType
      • UNKNOWN

        public static final JavaType.Kind UNKNOWN
        The unknown type kind
    • Method Detail

      • values

        public static JavaType.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 (JavaType.Kind c : JavaType.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 JavaType.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
      • getRawType

        public java.lang.reflect.Type getRawType​(java.lang.reflect.Type type)
        Get the raw type from the specified type
        Parameters:
        type - the specified type
        Returns:
        null as default
      • getSuperType

        public java.lang.reflect.Type getSuperType​(java.lang.reflect.Type type)
        Get the super type from the specified type
        Parameters:
        type - the specified type
        Returns:
        null as default
      • getInterfaces

        public java.lang.reflect.Type[] getInterfaces​(java.lang.reflect.Type type)
      • getGenericTypes

        public java.lang.reflect.Type[] getGenericTypes​(JavaType javaType)
      • valueOf

        public static JavaType.Kind valueOf​(java.lang.reflect.Type type)
        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:
        type - 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