Package io.microsphere.reflect
Enum JavaType.Kind
- java.lang.Object
-
- java.lang.Enum<JavaType.Kind>
-
- io.microsphere.reflect.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 CLASSThe type kind presents JavaClassGENERIC_ARRAY_TYPEThe type kind presents JavaGenericArrayTypePARAMETERIZED_TYPEThe type kind presents JavaParameterizedTypeTYPE_VARIABLEThe type kind presents JavaTypeVariableUNKNOWNThe unknown type kindWILDCARD_TYPEThe type kind presents JavaWildcardType
-
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.TypegetRawType(java.lang.reflect.Type type)Get the raw type from the specifiedtypejava.lang.reflect.TypegetSuperType(java.lang.reflect.Type type)Get the super type from the specifiedtypestatic JavaType.KindvalueOf(java.lang.reflect.Type type)Returns the enum constant of this type with the specified name.static JavaType.KindvalueOf(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.
-
-
-
Enum Constant Detail
-
CLASS
public static final JavaType.Kind CLASS
The type kind presents JavaClass
-
PARAMETERIZED_TYPE
public static final JavaType.Kind PARAMETERIZED_TYPE
The type kind presents JavaParameterizedType
-
TYPE_VARIABLE
public static final JavaType.Kind TYPE_VARIABLE
The type kind presents JavaTypeVariable
-
WILDCARD_TYPE
public static final JavaType.Kind WILDCARD_TYPE
The type kind presents JavaWildcardType
-
GENERIC_ARRAY_TYPE
public static final JavaType.Kind GENERIC_ARRAY_TYPE
The type kind presents JavaGenericArrayType
-
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 namejava.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 specifiedtype- Parameters:
type- the specifiedtype- Returns:
nullas default
-
getSuperType
public java.lang.reflect.Type getSuperType(java.lang.reflect.Type type)
Get the super type from the specifiedtype- Parameters:
type- the specifiedtype- Returns:
nullas 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 namejava.lang.NullPointerException- if the argument is null
-
-