Uses of Interface
java.lang.reflect.Type
Package | Description |
---|---|
java.lang |
Provides classes that are fundamental to the design of the Java
programming language.
|
java.lang.reflect |
Provides classes and interfaces for obtaining reflective information about
classes and objects.
|
-
Uses of Type in java.lang
Classes in java.lang that implement Type Modifier and Type Class Description class
Class<T>
Instances of the classClass
represent classes and interfaces in a running Java application.Methods in java.lang that return Type Modifier and Type Method Description Type[]
Class. getGenericInterfaces()
Returns theType
s representing the interfaces directly implemented by the class or interface represented by this object.Type
Class. getGenericSuperclass()
Returns theType
representing the direct superclass of the entity (class, interface, primitive type or void) represented by thisClass
. -
Uses of Type in java.lang.reflect
Subinterfaces of Type in java.lang.reflect Modifier and Type Interface Description interface
GenericArrayType
GenericArrayType
represents an array type whose component type is either a parameterized type or a type variable.interface
ParameterizedType
ParameterizedType represents a parameterized type such as Collection<String>.interface
TypeVariable<D extends GenericDeclaration>
TypeVariable is the common superinterface for type variables of kinds.interface
WildcardType
WildcardType represents a wildcard type expression, such as?
,? extends Number
, or? super Integer
.Methods in java.lang.reflect that return Type Modifier and Type Method Description Type[]
ParameterizedType. getActualTypeArguments()
Returns an array ofType
objects representing the actual type arguments to this type.Type[]
TypeVariable. getBounds()
Returns an array ofType
objects representing the upper bound(s) of this type variable.Type
GenericArrayType. getGenericComponentType()
Returns aType
object representing the component type of this array.Type[]
Constructor. getGenericExceptionTypes()
Returns an array ofType
objects that represent the exceptions declared to be thrown by this executable object.Type[]
Executable. getGenericExceptionTypes()
Returns an array ofType
objects that represent the exceptions declared to be thrown by this executable object.Type[]
Method. getGenericExceptionTypes()
Returns an array ofType
objects that represent the exceptions declared to be thrown by this executable object.Type[]
Constructor. getGenericParameterTypes()
Returns an array ofType
objects that represent the formal parameter types, in declaration order, of the executable represented by this object.Type[]
Executable. getGenericParameterTypes()
Returns an array ofType
objects that represent the formal parameter types, in declaration order, of the executable represented by this object.Type[]
Method. getGenericParameterTypes()
Returns an array ofType
objects that represent the formal parameter types, in declaration order, of the executable represented by this object.Type
Method. getGenericReturnType()
Returns aType
object that represents the formal return type of the method represented by thisMethod
object.Type
Field. getGenericType()
Returns aType
object that represents the declared type for the field represented by thisField
object.Type
RecordComponent. getGenericType()
Returns aType
object that represents the declared type for this record component.Type[]
WildcardType. getLowerBounds()
Returns an array ofType
objects representing the lower bound(s) of this type variable.Type
ParameterizedType. getOwnerType()
Returns aType
object representing the type that this type is a member of.Type
Parameter. getParameterizedType()
Returns aType
object that identifies the parameterized type for the parameter represented by thisParameter
object.Type
ParameterizedType. getRawType()
Returns theType
object representing the class or interface that declared this type.Type
AnnotatedType. getType()
Returns the underlying type that this annotated type represents.Type[]
WildcardType. getUpperBounds()
Returns an array ofType
objects representing the upper bound(s) of this type variable.