Package org.hibernate.models.internal
Record Class WildcardTypeDetailsImpl
java.lang.Object
java.lang.Record
org.hibernate.models.internal.WildcardTypeDetailsImpl
- All Implemented Interfaces:
TypeDetails,TypeVariableScope,WildcardTypeDetails
public record WildcardTypeDetailsImpl(TypeDetails bound, boolean isExtends)
extends Record
implements WildcardTypeDetails
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.TypeDetails
TypeDetails.Kind -
Constructor Summary
ConstructorsConstructorDescriptionWildcardTypeDetailsImpl(TypeDetails bound, boolean isExtends) Creates an instance of aWildcardTypeDetailsImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbound()Returns the value of theboundrecord component.final booleanIndicates whether some other object is "equal to" this one.getBound()Details about the type bound to the wildcardReturns the upper bound of this wildcard (e.g.getName()Returns the lower bound of this wildcard (e.g.final inthashCode()Returns a hash code value for this object.booleanbooleanisImplementor(Class<?> checkType) Whether the described class is an implementor of the givencheckType.resolveTypeVariable(TypeVariableDetails typeVariable) Resolve the type of the provided type variable relative to this scope.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.TypeDetails
asArrayType, asClassType, asParameterizedType, asPrimitiveType, asTypeVariable, asTypeVariableReference, asVoidType, determineRawClass, determineRelativeType, isResolvedMethods inherited from interface org.hibernate.models.spi.WildcardTypeDetails
asWildcardType, getTypeKind
-
Constructor Details
-
WildcardTypeDetailsImpl
Creates an instance of aWildcardTypeDetailsImplrecord class.- Parameters:
bound- the value for theboundrecord componentisExtends- the value for theisExtendsrecord component
-
-
Method Details
-
getBound
Details about the type bound to the wildcard- Specified by:
getBoundin interfaceWildcardTypeDetails
-
isExtends
public boolean isExtends()Indicates the type of bound -true->? extends Somethingfalse->? super Something
- Specified by:
isExtendsin interfaceWildcardTypeDetails
-
getExtendsBound
Returns the upper bound of this wildcard (e.g.SomeTypefor? extends SomeType).Returns
java.lang.Objectif this wildcard declares a lower bound (? super SomeType).- Specified by:
getExtendsBoundin interfaceWildcardTypeDetails- Returns:
- the upper bound, or
Objectif this wildcard has a lower bound
-
getSuperBound
Returns the lower bound of this wildcard (e.g.SomeTypefor? super SomeType).Returns
nullif this wildcard declares an upper bound (? extends SomeType).- Specified by:
getSuperBoundin interfaceWildcardTypeDetails- Returns:
- the lower bound, or
nullif this wildcard has an upper bound
-
getName
- Specified by:
getNamein interfaceTypeDetails
-
isImplementor
Description copied from interface:TypeDetailsWhether the described class is an implementor of the givencheckType.- Specified by:
isImplementorin 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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
bound
Returns the value of theboundrecord component.- Returns:
- the value of the
boundrecord component
-