This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
javax.lang.model.type
interface TypeVariable
- All Superinterfaces:
- ReferenceType, TypeMirror
public interface TypeVariable
extends ReferenceType
Represents a type variable.
A type variable may be explicitly declared by a
{@linkplain TypeParameterElement type parameter} of a
type, method, or constructor.
A type variable may also be declared implicitly, as by
the capture conversion of a wildcard type argument
(see chapter 5 of The Java Language Specification, Third
Edition).
Method Summary |
Element |
Returns the element corresponding to this type variable.
|
TypeMirror |
Returns the lower bound of this type variable.
|
TypeMirror |
Returns the upper bound of this type variable.
|
asElement
public Element asElement()
-
Returns the element corresponding to this type variable.
- Returns:
- the element corresponding to this type variable
getLowerBound
public TypeMirror getLowerBound()
-
Returns the lower bound of this type variable. While a type
parameter cannot include an explicit lower bound declaration,
capture conversion can produce a type variable with a
non-trivial lower bound. Type variables otherwise have a
lower bound of {@link NullType}.
- Returns:
- the lower bound of this type variable
getUpperBound
public TypeMirror getUpperBound()
-
Returns the upper bound of this type variable.
If this type variable was declared with no explicit
upper bounds, the result is {@code java.lang.Object}.
If it was declared with multiple upper bounds,
the result is an intersection type (modeled as a
{@link DeclaredType}).
Individual bounds can be found by examining the result's
{@linkplain Types#directSupertypes(TypeMirror) supertypes}.
- Returns:
- the upper bound of this type variable
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.