|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeVariable<T extends GenericDeclaration>
This is a common interface for all type variables provided by the Java language. Instances are created the first time a type variable is needed by one of the reflective methods declared in this package.
Creating a type variable requires resolving the appropriate type.
This may involve resolving other classes as a side effect (e.g.
if the type is nested inside other classes). Creation should not
involve resolving the bounds. Repeated creation has no effect; an
equivalent instance is returned. Caching is not required, but all
instances must be equal()
to each other.
Method Summary | |
---|---|
Type[] |
getBounds()
Returns an array of Type objects which represent the upper
bounds of this type variable. |
T |
getGenericDeclaration()
Returns a representation of the declaration used to declare this type variable. |
String |
getName()
Returns the name of the type variable, as written in the source code. |
Method Detail |
---|
Type[] getBounds()
Type
objects which represent the upper
bounds of this type variable. There is always a default bound of
Object
. Any ParameterizedType
s will be
created as necessary, and other types resolved.
Type
objects representing the upper
bounds.
TypeNotPresentException
- if any of the bounds refer to a
non-existant type.
MalformedParameterizedTypeException
- if the creation of a
ParameterizedType
fails.T getGenericDeclaration()
GenericDeclaration
object for this type
variable.String getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |