Interface TypeVariable

All Superinterfaces:
Type
@Deprecated(since="9",
            forRemoval=true)
public interface TypeVariable
extends Type
Deprecated, for removal: This API element is subject to removal in a future version.
The declarations in this package have been superseded by those in the package jdk.javadoc.doclet. For more information, see the Migration Guide in the documentation for that package.

Represents a type variable. For example, the generic interface List<E> has a single type variable E. A type variable may have explicit bounds, as in C<R extends Remote>.

Since:
1.5

Methods

Modifier and Type Method Description
AnnotationDesc[] annotations()

Deprecated, for removal: This API element is subject to removal in a future version.

Get the annotations of this program element.

Type[] bounds()

Deprecated, for removal: This API element is subject to removal in a future version.

Return the bounds of this type variable.

ProgramElementDoc owner()

Deprecated, for removal: This API element is subject to removal in a future version.

Return the class, interface, method, or constructor within which this type variable is declared.

Methods declared in interface com.sun.javadoc.Type

asAnnotatedType, asAnnotationTypeDoc, asClassDoc, asParameterizedType, asTypeVariable, asWildcardType, dimension, getElementType, isPrimitive, qualifiedTypeName, simpleTypeName, toString, typeName

Methods

bounds

Type[] bounds()
Deprecated, for removal: This API element is subject to removal in a future version.

Return the bounds of this type variable. These are the types given by the extends clause. Return an empty array if there are no explicit bounds.

Returns:
the bounds of this type variable.

owner

ProgramElementDoc owner()
Deprecated, for removal: This API element is subject to removal in a future version.

Return the class, interface, method, or constructor within which this type variable is declared.

Returns:
the class, interface, method, or constructor within which this type variable is declared.

annotations

AnnotationDesc[] annotations()
Deprecated, for removal: This API element is subject to removal in a future version.

Get the annotations of this program element. Return an empty array if there are none.

Returns:
the annotations of this program element or an empty array if there are none.

© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/com/sun/javadoc/TypeVariable.html