Package org.hibernate.models.internal
Record Class MissingPackageInfoDetails
java.lang.Object
java.lang.Record
org.hibernate.models.internal.MissingPackageInfoDetails
- All Implemented Interfaces:
Storable<ClassDetails,,SerialClassDetails> AnnotationTarget,ClassDetails,TypeVariableScope
public record MissingPackageInfoDetails(String packageName, String packageInfoClassName)
extends Record
implements ClassDetails
ClassDetails implementation used to represent a
package-info details when
there is not a physical package-info class.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.AnnotationTarget
AnnotationTarget.AnnotationUsageProcessor<T,A extends Annotation>, AnnotationTarget.Kind Nested classes/interfaces inherited from interface org.hibernate.models.spi.ClassDetails
ClassDetails.ClassDetailsConsumer -
Field Summary
Fields inherited from interface org.hibernate.models.spi.ClassDetails
CLASS_CLASS_DETAILS, OBJECT_CLASS_DETAILS, VOID_CLASS_DETAILS, VOID_OBJECT_CLASS_DETAILS -
Constructor Summary
ConstructorsConstructorDescriptionMissingPackageInfoDetails(String packageName, String packageInfoClassName) Creates an instance of aMissingPackageInfoDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidforEachField(IndexedConsumer<FieldDetails> consumer) Visit each fieldvoidforEachMethod(IndexedConsumer<MethodDetails> consumer) Visit each methodvoidVisit each method<A extends Annotation,C extends Annotation>
voidforEachRepeatedAnnotationUsages(Class<A> repeatable, Class<C> container, ModelsContext modelContext, Consumer<A> consumer) <A extends Annotation>
AgetAnnotationUsage(AnnotationDescriptor<A> descriptor, ModelsContext modelContext) Get the usage of the given annotation on this target.The name of theClass, ornullfor dynamic models.<A extends Annotation>
AgetDirectAnnotationUsage(Class<A> type) Form ofAnnotationTarget.getDirectAnnotationUsage(AnnotationDescriptor)accepting the annotation Class<A extends Annotation>
AgetDirectAnnotationUsage(AnnotationDescriptor<A> descriptor) Form of AnnotationTarget.getAnnotationUsage(AnnotationDescriptor, ModelsContext) which returnsnullinstead of throwing AnnotationAccessException when more than one usage of the requested annotation exists.Collection<? extends Annotation> Access to all the annotations used on this target.Get the fields for this classGeneric type information for this class.Details for the interfaces this class implements.<A extends Annotation>
List<? extends Annotation> getMetaAnnotated(Class<A> metaAnnotationType, ModelsContext modelContext) Returns all Annotation usages from this target where the usage's annotation class is annotated with the givenmetaAnnotationType.Get the methods for this classgetName()The name of the class.<X extends Annotation>
XgetNamedAnnotationUsage(Class<X> type, String matchName, String attributeToMatch, ModelsContext modelContext) <X extends Annotation>
XgetNamedAnnotationUsage(AnnotationDescriptor<X> type, String matchName, String attributeToMatch, ModelsContext modelContext) Get a usage of the given annotationtypewhoseattributeToMatchattribute value matches the givenmatchName.Get the record components for this class<A extends Annotation>
A[]getRepeatedAnnotationUsages(AnnotationDescriptor<A> type, ModelsContext modelContext) Get all usages of the specifiedannotationTypein this scope.Details for the class that is the super type for this class.Access to the type parameters associated with this class.<A extends Annotation>
booleanhasAnnotationUsage(Class<A> type, ModelsContext modelContext) Whether the given annotation is used on this target.<A extends Annotation>
booleanhasDirectAnnotationUsage(Class<A> type) Whether the given annotation is used on this target.final inthashCode()Returns a hash code value for this object.booleanWhether the class should be considered abstract.booleanisEnum()Whether this class is an enumbooleanisImplementor(Class<?> checkType) Whether the described class is an implementor of the givencheckType.booleanWhether this class is an interfacebooleanisRecord()Where the class is a Java recordbooleanWhether the Class, if one, represented by this ClassDetails is already loaded on the ClassLoader used for loading.<A extends Annotation>
AlocateAnnotationUsage(Class<A> type, ModelsContext modelContext) Form of AnnotationTarget.getAnnotationUsage(org.hibernate.models.spi.AnnotationDescriptor<A>, org.hibernate.models.spi.ModelsContext) which also considers meta-annotations - annotations on the classes of each local annotation.Returns the value of thepackageInfoClassNamerecord component.Returns the value of thepackageNamerecord component.<X> Class<X> Load the corresponding Class using standard ClassLoading.<X> Class<X> toJavaClass(ClassLoading classLoading, ModelsContext modelContext) Load the corresponding Class using the specifiedClassLoading.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.AnnotationTarget
forEachAnnotationUsage, forEachAnnotationUsage, forEachDirectAnnotationUsage, forEachRepeatedAnnotationUsages, fromAnnotations, fromContainers, fromSelfAndContainers, getAnnotationUsage, getNamedAnnotationUsage, getNamedAnnotationUsage, getRepeatedAnnotationUsages, walkContainers, walkSelfAndContainersMethods inherited from interface org.hibernate.models.spi.ClassDetails
asAnnotationDescriptor, asClassDetails, asFieldDetails, asMemberDetails, asMethodDetails, asRecordComponentDetails, determineRawClass, findField, findFieldByName, findRecordComponent, findRecordComponentByName, forEachMember, forEachPersistableMember, forEachSuper, forSelfAndEachSuper, getContainer, getKind, isSuperclass, resolveTypeVariable
-
Constructor Details
-
MissingPackageInfoDetails
Creates an instance of aMissingPackageInfoDetailsrecord class.- Parameters:
packageName- the value for thepackageNamerecord componentpackageInfoClassName- the value for thepackageInfoClassNamerecord component
-
-
Method Details
-
getName
Description copied from interface:ClassDetailsThe name of the class. Generally this is the same as the class name. But in the case of Hibernate'sentity-namefeature, this would be theentity-name- Specified by:
getNamein interfaceAnnotationTarget- Specified by:
getNamein interfaceClassDetails
-
getDirectAnnotationUsages
Description copied from interface:AnnotationTargetAccess to all the annotations used on this target.- Specified by:
getDirectAnnotationUsagesin interfaceAnnotationTarget
-
hasDirectAnnotationUsage
Description copied from interface:AnnotationTargetWhether the given annotation is used on this target.- Specified by:
hasDirectAnnotationUsagein interfaceAnnotationTarget- See Also:
-
getDirectAnnotationUsage
Description copied from interface:AnnotationTargetForm of AnnotationTarget.getAnnotationUsage(AnnotationDescriptor, ModelsContext) which returnsnullinstead of throwing AnnotationAccessException when more than one usage of the requested annotation exists.- Specified by:
getDirectAnnotationUsagein interfaceAnnotationTarget
-
getDirectAnnotationUsage
Description copied from interface:AnnotationTargetForm ofAnnotationTarget.getDirectAnnotationUsage(AnnotationDescriptor)accepting the annotation Class- Specified by:
getDirectAnnotationUsagein interfaceAnnotationTarget
-
hasAnnotationUsage
Description copied from interface:AnnotationTargetWhether the given annotation is used on this target.- Specified by:
hasAnnotationUsagein interfaceAnnotationTarget- See Also:
-
getAnnotationUsage
public <A extends Annotation> A getAnnotationUsage(AnnotationDescriptor<A> descriptor, ModelsContext modelContext) Description copied from interface:AnnotationTargetGet the usage of the given annotation on this target. For repeatable annotation types (e.g.@NamedQuery), this method will either-- if a single repeatable annotation itself is present, it is returned.
-
if the "containing annotation" is present (e.g.
@NamedQueries),- if the container contains just a single repeatable, that one is returned
-
if the container contains multiple repeatables,
AnnotationAccessExceptionwill be thrown
- Specified by:
getAnnotationUsagein interfaceAnnotationTarget- Returns:
- The usage or
null
-
locateAnnotationUsage
Description copied from interface:AnnotationTargetForm of AnnotationTarget.getAnnotationUsage(org.hibernate.models.spi.AnnotationDescriptor<A>, org.hibernate.models.spi.ModelsContext) which also considers meta-annotations - annotations on the classes of each local annotation.- Specified by:
locateAnnotationUsagein interfaceAnnotationTarget
-
getRepeatedAnnotationUsages
public <A extends Annotation> A[] getRepeatedAnnotationUsages(AnnotationDescriptor<A> type, ModelsContext modelContext) Description copied from interface:AnnotationTargetGet all usages of the specifiedannotationTypein this scope.- Specified by:
getRepeatedAnnotationUsagesin interfaceAnnotationTarget
-
forEachRepeatedAnnotationUsages
public <A extends Annotation,C extends Annotation> void forEachRepeatedAnnotationUsages(Class<A> repeatable, Class<C> container, ModelsContext modelContext, Consumer<A> consumer) - Specified by:
forEachRepeatedAnnotationUsagesin interfaceAnnotationTarget
-
getMetaAnnotated
public <A extends Annotation> List<? extends Annotation> getMetaAnnotated(Class<A> metaAnnotationType, ModelsContext modelContext) Description copied from interface:AnnotationTargetReturns all Annotation usages from this target where the usage's annotation class is annotated with the givenmetaAnnotationType. E.g., given the following class and annotationsa call to this method passing@interface TheMeta{ ... }@TheMeta(...)@interface TheAnnotation{ ... }@TheAnnotationclass TheClass{ ... }TheMetaonClassDetails(TheClass)will return the usage of@TheAnnotationonTheClass.- Specified by:
getMetaAnnotatedin interfaceAnnotationTarget
-
getNamedAnnotationUsage
public <X extends Annotation> X getNamedAnnotationUsage(AnnotationDescriptor<X> type, String matchName, String attributeToMatch, ModelsContext modelContext) Description copied from interface:AnnotationTargetGet a usage of the given annotationtypewhoseattributeToMatchattribute value matches the givenmatchName.- Specified by:
getNamedAnnotationUsagein interfaceAnnotationTarget- Parameters:
matchName- The name to match.attributeToMatch- Name of the attribute to match on.
-
getNamedAnnotationUsage
public <X extends Annotation> X getNamedAnnotationUsage(Class<X> type, String matchName, String attributeToMatch, ModelsContext modelContext) Description copied from interface:AnnotationTargetHelper form of AnnotationTarget.getNamedAnnotationUsage(AnnotationDescriptor, String, String, ModelsContext)- Specified by:
getNamedAnnotationUsagein interfaceAnnotationTarget
-
getClassName
Description copied from interface:ClassDetailsThe name of theClass, ornullfor dynamic models.- Specified by:
getClassNamein interfaceClassDetails
-
isResolved
public boolean isResolved()Description copied from interface:ClassDetailsWhether the Class, if one, represented by this ClassDetails is already loaded on the ClassLoader used for loading.- Specified by:
isResolvedin interfaceClassDetails- Returns:
truewhen there is a physical backing class, and it is loaded;falseotherwise.
-
isAbstract
public boolean isAbstract()Description copied from interface:ClassDetailsWhether the class should be considered abstract.- Specified by:
isAbstractin interfaceClassDetails
-
isInterface
public boolean isInterface()Description copied from interface:ClassDetailsWhether this class is an interface- Specified by:
isInterfacein interfaceClassDetails
-
isEnum
public boolean isEnum()Description copied from interface:ClassDetailsWhether this class is an enum- Specified by:
isEnumin interfaceClassDetails
-
isRecord
public boolean isRecord()Description copied from interface:ClassDetailsWhere the class is a Java record- Specified by:
isRecordin interfaceClassDetails
-
getSuperClass
Description copied from interface:ClassDetailsDetails for the class that is the super type for this class.- Specified by:
getSuperClassin interfaceClassDetails
-
getGenericSuperType
Description copied from interface:ClassDetailsGeneric type information for this class.- Specified by:
getGenericSuperTypein interfaceClassDetails
-
getImplementedInterfaces
Description copied from interface:ClassDetailsDetails for the interfaces this class implements.- Specified by:
getImplementedInterfacesin interfaceClassDetails
-
getTypeParameters
Description copied from interface:ClassDetailsAccess to the type parameters associated with this class.- Specified by:
getTypeParametersin interfaceClassDetails
-
isImplementor
Description copied from interface:ClassDetailsWhether the described class is an implementor of the givencheckType.- Specified by:
isImplementorin interfaceClassDetails
-
getFields
Description copied from interface:ClassDetailsGet the fields for this class- Specified by:
getFieldsin interfaceClassDetails
-
forEachField
Description copied from interface:ClassDetailsVisit each field- Specified by:
forEachFieldin interfaceClassDetails
-
getMethods
Description copied from interface:ClassDetailsGet the methods for this class- Specified by:
getMethodsin interfaceClassDetails
-
forEachMethod
Description copied from interface:ClassDetailsVisit each method- Specified by:
forEachMethodin interfaceClassDetails
-
getRecordComponents
Description copied from interface:ClassDetailsGet the record components for this class- Specified by:
getRecordComponentsin interfaceClassDetails
-
forEachRecordComponent
Description copied from interface:ClassDetailsVisit each method- Specified by:
forEachRecordComponentin interfaceClassDetails
-
toJavaClass
Description copied from interface:ClassDetailsLoad the corresponding Class using standard ClassLoading.- Specified by:
toJavaClassin interfaceClassDetails- See Also:
-
toJavaClass
Description copied from interface:ClassDetailsLoad the corresponding Class using the specifiedClassLoading.- Specified by:
toJavaClassin interfaceClassDetails- Parameters:
classLoading- Where to load the class from/intomodelContext- The model context
-
toStorableForm
- Specified by:
toStorableFormin interfaceStorable<ClassDetails,SerialClassDetails>
-
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). -
packageName
Returns the value of thepackageNamerecord component.- Returns:
- the value of the
packageNamerecord component
-
packageInfoClassName
Returns the value of thepackageInfoClassNamerecord component.- Returns:
- the value of the
packageInfoClassNamerecord component
-