java.lang.reflect
package.public static Object | Creates a new empty array instance that is compatible with the argument type. |
public static Type | deannotateType( Deannotates the argument type object. |
public static Class< | getClassFromType( Gets the class of a type, and from the value that is treated as an instance of the given type. |
public static Collection< | getClassLoadersFromType( Gets the classloaders which are associated with the given type. |
public static Class< | Gets the class representation of the generic array type represented by the argument. |
public static Class< | Gets the component class of the generic array type represented by the argument. |
public static List< | getTypeArguments( Gets a list that contains the actual type parameters of
the argument, if it is a parameterized type. |
public static Type | getTypeArguments( Gets the type parameter of the possibly parameterized argument type at the given index. |
public static Type | makeArrayType( Gets a Type that has the argument type as its component. |
public static ParameterizedType | makeParameterizedType( Creates a new ParameterizedType for the given type, and template arguments. |
public static ParameterizedType | makeParameterizedTypeWithOwner( Creates a new ParameterizedType for the given owner, type, and template arguments. |
public static WildcardType | makeWildcardTypeExtends( Creates a new WildcardType that extends the argument types. |
public static WildcardType | makeWildcardTypeSuper( Creates a new WildcardType that is a super type of the argument types. |
The raw component type of the generic array type will be retrieved, and a new empty array is created for it. The component type will be resolved accordingly. This method will only be available to create a new array instance if the innermost component type is either a Class, or ParameterizedType. The method cannot create an array for type that have a wildcard or type variable component type.
null
.If the argument is an instance of AnnotatedType, the AnnotatedType.getType() method will be called on it. This is repeated until the last type is not an annotated type.
If the value
is not null
, the class of the value object is returned.
Else the given type is examined.
If it is an instance of Class, it is returned.
If it is an instance of ParameterizedType, the raw type is returned.
If it is an instance of GenericArrayType, the array type corresponding to it is returned.
In any other cases, null
is returned. Wildcards and
type variables are not recognized.
null
if failed to determine.This method examines the argument type, and gets the classloaders for them.
If the type is a Class, the classloader of that class is added.
If the type is a ParameterizedType, the classloaders for the raw type, and the type arguments are added.
If the type is a GenericArrayType, the classloaders for the component type is added.
If the type is a WildcardType, the classloaders for the upper and lower bounds is added.
If the type is a TypeVariable, the classloaders for the bounds and the generic declaration is added.
In any other case, the type is unrecognized, and no classloaders are added.
null
.null
.null
.If the argument is not a parameterized type, an empty list is returned.
This method will check if the argument is an instanceo of ParameterizedType, and return the actual type argument at the given index.
If the argument is not an instance of ParameterizedType, or the index is out of bounds for the type arguments, Object.class is returned.
Object.class
.The returned type is either an instance of GenericArrayType, or a Class.
null
.
The returned ParameterizedType will have the given arguments as its attributes. The result will have
null
owner type.
The template argument array may or may not be cloned. Any modifications made to it may be reflected on the returned result. Callers shouldn't rely on the array being modifiable after this call returns.
null
.The returned ParameterizedType will have the given arguments as its attributes.
The template argument array may or may not be cloned. Any modifications made to it may be reflected on the returned result. Callers shouldn't rely on the array being modifiable after this call returns.
null
.The extended types argument array may or may not be cloned. Any modifications made to it may be reflected on the returned result. Callers shouldn't rely on the array being modifiable after this call returns.
null
.The super types argument array may or may not be cloned. Any modifications made to it may be reflected on the returned result. Callers shouldn't rely on the array being modifiable after this call returns.
null
.