APIdia Launch Partner
Top Description Methods
javax.lang.model.element

public Interface TypeParameterElement

extends Element
Imports
java.util.List, javax.lang.model.type.TypeMirror, .TypeVariable

Represents a formal type parameter of a generic class, interface, method, or constructor element. A type parameter declares a TypeVariable.
Since
1.6
Java Language Specification
8.1.2 Generic Classes and Type Parameters, 8.4.4 Generic Methods, 8.8.4 Generic Constructors, 9.1.2 Generic Interfaces and Type Parameters
See Also
TypeVariable

Method Summary

Modifier and TypeMethod and Description
public TypeMirror

Returns:

the type variable corresponding to this type parameter element
asType
()

Redeclares javax.lang.model.element.Element.asType.

Returns the type variable corresponding to this type parameter element.

public List<? extends TypeMirror>

Returns:

the bounds of this type parameter, or an empty list if there are none
getBounds
()

Returns the bounds of this type parameter.

public Element

Returns:

the generic element of this type parameter
getEnclosingElement
()

Redeclares javax.lang.model.element.Element.getEnclosingElement.

Returns the generic element of this type parameter.

public Element

Returns:

the generic class, interface, method, or constructor that is parameterized by this type parameter
getGenericElement
()

Returns the generic class, interface, method, or constructor that is parameterized by this type parameter.

Inherited from javax.lang.model.element.Element:
acceptequalsgetAnnotationgetAnnotationMirrorsgetAnnotationsByTypegetEnclosedElementsgetKindgetModifiersgetSimpleNamehashCode

Method Detail

asTypeback to summary
public TypeMirror asType()

Redeclares javax.lang.model.element.Element.asType.

Returns the type variable corresponding to this type parameter element.

Returns:TypeMirror

the type variable corresponding to this type parameter element

Annotations
@Override
See Also
TypeVariable
getBoundsback to summary
public List<? extends TypeMirror> getBounds()

Returns the bounds of this type parameter. These are the types given by the extends clause used to declare this type parameter. If no explicit extends clause was used, then java.lang.Object is considered to be the sole bound.

Returns:List<? extends TypeMirror>

the bounds of this type parameter, or an empty list if there are none

getEnclosingElementback to summary
public Element getEnclosingElement()

Redeclares javax.lang.model.element.Element.getEnclosingElement.

Returns the generic element of this type parameter.

Returns:Element

the generic element of this type parameter

Annotations
@Override
getGenericElementback to summary
public Element getGenericElement()

Returns the generic class, interface, method, or constructor that is parameterized by this type parameter.

Returns:Element

the generic class, interface, method, or constructor that is parameterized by this type parameter