Multiple objects may be instantiated at run-time to represent a given type variable. Even though a type variable is created only once, this does not imply any requirement to cache instances representing the type variable. However, all instances representing a type variable must be equal() to each other. As a consequence, users of type variables must not rely on the identity of instances of classes implementing this interface.
| Modifier and Type | Method and Description |
|---|---|
| public AnnotatedType[] | Returns: an array of objects representing the upper bound(s) of the type variableReturns an array of AnnotatedType objects that represent the use of types to denote the upper bounds of the type parameter represented by this TypeVariable. |
| public Type[] | Returns: an array ofTypes representing the upper
bound(s) of this type variableReturns an array of |
| public D | Returns: the generic declaration declared for this type variable.Returns a |
| public String | Returns: the name of this type variable, as it appears in the source codeReturns the name of this type variable, as it occurs in the source code. |
| getAnnotatedBounds | back to summary |
|---|---|
| public AnnotatedType[] getAnnotatedBounds() Returns an array of AnnotatedType objects that represent the use of
types to denote the upper bounds of the type parameter represented by
this TypeVariable. The order of the objects in the array corresponds to
the order of the bounds in the declaration of the type parameter. Note that
if no upper bound is explicitly declared, the upper bound is unannotated
| |
| getBounds | back to summary |
|---|---|
| public Type[] getBounds() Returns an array of For each upper bound B:
| |
| getGenericDeclaration | back to summary |
|---|---|
| public D getGenericDeclaration() Returns a
| |
| getName | back to summary |
|---|---|
| public String getName() Returns the name of this type variable, as it occurs in the source code.
| |