Top Description Methods
jakarta.enterprise.lang.model.types

public Interface TypeVariable

extends Type
Imports
java.util.List

Type variables represent type parameters declared on generic classes or methods. All type variables have bounds. A type variable with no bound declared is equivalent to a type variable with a single bound of java.lang.Object and is represented as such. If one bound is declared, it is a type variable or a class type, possibly parameterized. If more than one bound is declared, the first bound is a class type or an interface type, possibly parameterized, and the following bounds are interface types, possibly parameterized.

Method Summary

Modifier and TypeMethod and Description
public default TypeVariable
public List<Type>

Returns:

the bounds declared for this type variable, never null or empty
bounds
()

Returns the bounds declared for this type variable.

public default Type.Kind
kind()

Implements jakarta.enterprise.lang.model.types.Type.kind.

Returns the kind of this type.

public String

Returns:

the name of this type variable, never null
name
()

Returns the name of this type variable.

Inherited from jakarta.enterprise.lang.model.types.Type:
asArrayasClassasDeclarationasParameterizedTypeasPrimitiveasTypeasVoidasWildcardTypeisArrayisClassisDeclarationisParameterizedTypeisPrimitiveisTypeisTypeVariableisVoidisWildcardType

Method Detail

asTypeVariableback to summary
public default TypeVariable asTypeVariable()

Overrides default jakarta.enterprise.lang.model.types.Type.asTypeVariable.

Doc from jakarta.enterprise.lang.model.types.Type.asTypeVariable.

Returns this type as a type variable. Type variables are also used to represent type parameters in declarations of parameterized types.

Returns:TypeVariable

this type variable, never null

Annotations
@Override
boundsback to summary
public List<Type> bounds()

Returns the bounds declared for this type variable.

Returns:List<Type>

the bounds declared for this type variable, never null or empty

kindback to summary
public default Type.Kind kind()

Implements jakarta.enterprise.lang.model.types.Type.kind.

Doc from jakarta.enterprise.lang.model.types.Type.kind.

Returns the kind of this type.

Returns:Type.Kind

the kind of this type

Annotations
@Override
nameback to summary
public String name()

Returns the name of this type variable.

Returns:String

the name of this type variable, never null