Package org.hibernate.models.internal
Record Class PrimitiveTypeDetailsImpl
java.lang.Object
java.lang.Record
org.hibernate.models.internal.PrimitiveTypeDetailsImpl
- All Implemented Interfaces:
ClassBasedTypeDetails,PrimitiveTypeDetails,TypeDetails,TypeVariableScope
public record PrimitiveTypeDetailsImpl(ClassDetails classDetails)
extends Record
implements PrimitiveTypeDetails
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.TypeDetails
TypeDetails.Kind -
Constructor Summary
ConstructorsConstructorDescriptionPrimitiveTypeDetailsImpl(ClassDetails classDetails) Creates an instance of aPrimitiveTypeDetailsImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionCast this TypeDetails as a PrimitiveTypeDetails, throwing an exception if it cannot be.Returns the value of theclassDetailsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.resolveTypeVariable(TypeVariableDetails typeVariable) Resolve the type of the provided type variable relative to this scope.chartoCode()final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.models.spi.ClassBasedTypeDetails
getName, isImplementorMethods inherited from interface org.hibernate.models.spi.TypeDetails
asArrayType, asClassType, asParameterizedType, asTypeVariable, asTypeVariableReference, asVoidType, asWildcardType, determineRawClass, determineRelativeType, isResolved
-
Constructor Details
-
PrimitiveTypeDetailsImpl
Creates an instance of aPrimitiveTypeDetailsImplrecord class.- Parameters:
classDetails- the value for theclassDetailsrecord component
-
-
Method Details
-
getTypeKind
- Specified by:
getTypeKindin interfacePrimitiveTypeDetails- Specified by:
getTypeKindin interfaceTypeDetails
-
getPrimitiveKind
- Specified by:
getPrimitiveKindin interfacePrimitiveTypeDetails
-
asPrimitiveType
Description copied from interface:TypeDetailsCast this TypeDetails as a PrimitiveTypeDetails, throwing an exception if it cannot be.- Specified by:
asPrimitiveTypein interfacePrimitiveTypeDetails- Specified by:
asPrimitiveTypein interfaceTypeDetails
-
resolveTypeVariable
Description copied from interface:TypeVariableScopeResolve the type of the provided type variable relative to this scope. For example, givenclass
A call to this method on theThing<I extends Number>{ I id; }Thingscope with the type variable representingIwill return theI extends Numbertype variable definition itself. If this scope defines a corresponding type argument, the concrete type is returned. For example, givenclass
This method will yield theStuff extends Thing<Integer>{ }Integertype details.- Specified by:
resolveTypeVariablein interfaceTypeVariableScope- Parameters:
typeVariable- The type variable to resolve- Returns:
- The type variable's resolved type, or
nullif none could be found
-
getClassDetails
- Specified by:
getClassDetailsin interfaceClassBasedTypeDetails- Specified by:
getClassDetailsin interfacePrimitiveTypeDetails
-
toCode
public char toCode()- Specified by:
toCodein interfacePrimitiveTypeDetails
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
classDetails
Returns the value of theclassDetailsrecord component.- Returns:
- the value of the
classDetailsrecord component
-