Package org.hibernate.models.spi
Interface TypeVariableReferenceDetails
- All Superinterfaces:
TypeDetails,TypeVariableScope
- All Known Implementing Classes:
TypeVariableReferenceDetailsImpl
Models a reference to a type variable in the bound of a recursive type parameter.
The referenced type variable is available via
getTarget(). The name of the type variable
corresponds to the raw type name which here comes from the target.
The identifier is the name of the type variable as present
in the source code.
For example,
T extends Comparable<T>
In this case, we have uses of the 2 type variable T. The initial one
is modeled as a TypeVariableDetails. The second one (as part of
Comparable<T>) is modeled as a TypeVariableReferenceDetails.
The identifier is T while the name
is Comparable.- API Note:
- This split between TypeVariableDetails and TypeVariableReferenceDetails helps protect against stack overflows while processing generics.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.TypeDetails
TypeDetails.Kind -
Method Summary
Modifier and TypeMethodDescriptiondefault TypeVariableReferenceDetailsCast this TypeDetails as a TypeVariableReferenceDetails, throwing an exception if it cannot be.default TypeDetails.KindMethods inherited from interface org.hibernate.models.spi.TypeDetails
asArrayType, asClassType, asParameterizedType, asPrimitiveType, asTypeVariable, asVoidType, asWildcardType, determineRawClass, determineRelativeType, getName, isImplementor, isResolvedMethods inherited from interface org.hibernate.models.spi.TypeVariableScope
resolveTypeVariable
-
Method Details
-
getIdentifier
String getIdentifier() -
getTarget
TypeVariableDetails getTarget() -
getTypeKind
- Specified by:
getTypeKindin interfaceTypeDetails
-
asTypeVariableReference
Description copied from interface:TypeDetailsCast this TypeDetails as a TypeVariableReferenceDetails, throwing an exception if it cannot be.- Specified by:
asTypeVariableReferencein interfaceTypeDetails
-