Package org.hibernate.models.spi
Interface TypeDetails
- All Superinterfaces:
TypeVariableScope
- All Known Subinterfaces:
ArrayTypeDetails,ClassBasedTypeDetails,ClassTypeDetails,ParameterizedTypeDetails,PrimitiveTypeDetails,TypeVariableDetails,TypeVariableReferenceDetails,VoidTypeDetails,WildcardTypeDetails
- All Known Implementing Classes:
ArrayTypeDetailsImpl,ClassTypeDetailsImpl,ParameterizedTypeDetailsImpl,PrimitiveTypeDetailsImpl,TypeVariableDetailsImpl,TypeVariableReferenceDetailsImpl,VoidTypeDetailsImpl,WildcardTypeDetailsImpl
Abstraction for what Hibernate understands about a "type", generally before it has access to
the actual
Type reference.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault ArrayTypeDetailsCast this TypeDetails as a ArrayTypeDetails, throwing an exception if it cannot be.default ClassTypeDetailsCast this TypeDetails as a ClassTypeDetails, throwing an exception if it cannot be.default ParameterizedTypeDetailsCast this TypeDetails as a ParameterizedTypeDetails, throwing an exception if it cannot be.default PrimitiveTypeDetailsCast this TypeDetails as a PrimitiveTypeDetails, throwing an exception if it cannot be.default TypeVariableDetailsCast this TypeDetails as a TypeVariableDetails, throwing an exception if it cannot be.default TypeVariableReferenceDetailsCast this TypeDetails as a TypeVariableReferenceDetails, throwing an exception if it cannot be.default VoidTypeDetailsCast this TypeDetails as a VoidTypeDetails, throwing an exception if it cannot be.default WildcardTypeDetailsCast this TypeDetails as a WildcardTypeDetails, throwing an exception if it cannot be.default ClassDetailsDetermine the raw class for the given type.default TypeDetailsdetermineRelativeType(TypeVariableScope container) Determine the type relative to the passedcontainer.getName()booleanisImplementor(Class<?> checkType) Whether the described class is an implementor of the givencheckType.default booleanDetermine whether all the bounds (if any) of the type are concretely knownMethods inherited from interface org.hibernate.models.spi.TypeVariableScope
resolveTypeVariable
-
Method Details
-
getName
String getName() -
getTypeKind
TypeDetails.Kind getTypeKind() -
isImplementor
Whether the described class is an implementor of the givencheckType. -
asClassType
Cast this TypeDetails as a ClassTypeDetails, throwing an exception if it cannot be. -
asPrimitiveType
Cast this TypeDetails as a PrimitiveTypeDetails, throwing an exception if it cannot be. -
asVoidType
Cast this TypeDetails as a VoidTypeDetails, throwing an exception if it cannot be. -
asArrayType
Cast this TypeDetails as a ArrayTypeDetails, throwing an exception if it cannot be. -
asTypeVariable
Cast this TypeDetails as a TypeVariableDetails, throwing an exception if it cannot be. -
asParameterizedType
Cast this TypeDetails as a ParameterizedTypeDetails, throwing an exception if it cannot be. -
asTypeVariableReference
Cast this TypeDetails as a TypeVariableReferenceDetails, throwing an exception if it cannot be. -
asWildcardType
Cast this TypeDetails as a WildcardTypeDetails, throwing an exception if it cannot be. -
isResolved
default boolean isResolved()Determine whether all the bounds (if any) of the type are concretely known For example, given:class
The type forThing<T>{ T id; } classAnotherThing extends Thing<Integer>{ }idrelative toThingis NOT resolved whereas the type foridrelative toAnotherThingis. -
determineRelativeType
Determine the type relative to the passedcontainer. For example, given the classes defined in isResolved(), calling this method has the following outcomes based on the passedcontainer-- Passing
Thing, the result would be theParameterizedTypeDetails(T) - Passing
AnotherThing, the result would beClassTypeDetails(Integer)
- Passing
-
determineRawClass
Description copied from interface:TypeVariableScopeDetermine the raw class for the given type. Never returnsnull, opting to return Object instead if the raw class is not known- Specified by:
determineRawClassin interfaceTypeVariableScope- Returns:
- The raw class details, or Object if "not known".
-