Package org.hibernate.models.internal
Class AbstractAnnotationDescriptor<A extends Annotation>
java.lang.Object
org.hibernate.models.internal.AbstractAnnotationTarget
org.hibernate.models.internal.AbstractAnnotationDescriptor<A>
- All Implemented Interfaces:
AnnotationTargetSupport,Storable<AnnotationDescriptor<A>,,SerialAnnotationDescriptor<A>> AnnotationDescriptor<A>,AnnotationTarget,MutableAnnotationTarget
- Direct Known Subclasses:
OrmAnnotationDescriptor,StandardAnnotationDescriptor
public abstract class AbstractAnnotationDescriptor<A extends Annotation>
extends AbstractAnnotationTarget
implements AnnotationDescriptor<A>
Base support for
AnnotationDescriptor implementations-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.AnnotationTarget
AnnotationTarget.AnnotationUsageProcessor<T,A extends Annotation>, AnnotationTarget.Kind -
Constructor Summary
ConstructorsConstructorDescriptionAbstractAnnotationDescriptor(Class<A> annotationType, EnumSet<AnnotationTarget.Kind> allowableTargets, boolean inherited, AnnotationDescriptor<?> repeatableContainer) -
Method Summary
Modifier and TypeMethodDescription<X extends Annotation>
AnnotationDescriptor<X> Safe cast method for cases when the target is an annotation.Safe cast method for cases when the target is a record component.The places the described annotation can be usedThe annotation typeCollection<? extends Annotation> Access to all the annotations used on this target.getName()A descriptive name for the target used mostly for loggingIf the described annotation is repeatable, returns the descriptor for the container annotation.<X extends Annotation>
X[]getRepeatedAnnotationUsages(Class<X> type, ModelsContext modelContext) Form of AnnotationTarget.getRepeatedAnnotationUsages(AnnotationDescriptor, ModelsContext) accepting the annotation Class<X extends Annotation>
X[]getRepeatedAnnotationUsages(AnnotationDescriptor<X> type, ModelsContext modelContext) Get all usages of the specifiedannotationTypein this scope.booleanWhether the annotation defined as inheritedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.models.spi.AnnotationDescriptor
as, createUsage, createUsage, createUsage, findAttribute, getAttribute, getAttributes, getContainer, getKind, isRepeatable, toStorableFormMethods inherited from interface org.hibernate.models.spi.AnnotationTarget
forEachAnnotationUsage, forEachAnnotationUsage, forEachDirectAnnotationUsage, fromAnnotations, fromContainers, fromSelfAndContainers, getNamedAnnotationUsage, walkContainers, walkSelfAndContainersMethods inherited from interface org.hibernate.models.internal.AnnotationTargetSupport
addAnnotationUsage, clearAnnotationUsages, forEachRepeatedAnnotationUsages, forEachRepeatedAnnotationUsages, getAnnotationUsage, getAnnotationUsage, getDirectAnnotationUsage, getDirectAnnotationUsage, getMetaAnnotated, getNamedAnnotationUsage, getNamedAnnotationUsage, getNamedAnnotationUsage, getUsageMap, hasAnnotationUsage, hasDirectAnnotationUsage, locateAnnotationUsage, removeAnnotationUsage, replaceAnnotationUsageMethods inherited from interface org.hibernate.models.spi.MutableAnnotationTarget
applyAnnotationUsage, replaceAnnotationUsage
-
Constructor Details
-
AbstractAnnotationDescriptor
public AbstractAnnotationDescriptor(Class<A> annotationType, EnumSet<AnnotationTarget.Kind> allowableTargets, boolean inherited, AnnotationDescriptor<?> repeatableContainer)
-
-
Method Details
-
getAnnotationType
Description copied from interface:AnnotationDescriptorThe annotation type- Specified by:
getAnnotationTypein interfaceAnnotationDescriptor<A extends Annotation>
-
getName
Description copied from interface:AnnotationTargetA descriptive name for the target used mostly for logging- Specified by:
getNamein interfaceAnnotationTarget
-
getAllowableTargets
Description copied from interface:AnnotationDescriptorThe places the described annotation can be used- Specified by:
getAllowableTargetsin interfaceAnnotationDescriptor<A extends Annotation>
-
isInherited
public boolean isInherited()Description copied from interface:AnnotationDescriptorWhether the annotation defined as inherited- Specified by:
isInheritedin interfaceAnnotationDescriptor<A extends Annotation>
-
getRepeatableContainer
Description copied from interface:AnnotationDescriptorIf the described annotation is repeatable, returns the descriptor for the container annotation.- Specified by:
getRepeatableContainerin interfaceAnnotationDescriptor<A extends Annotation>
-
getDirectAnnotationUsages
Description copied from interface:AnnotationTargetAccess to all the annotations used on this target.- Specified by:
getDirectAnnotationUsagesin interfaceAnnotationTarget- Specified by:
getDirectAnnotationUsagesin interfaceAnnotationTargetSupport
-
getRepeatedAnnotationUsages
public <X extends Annotation> X[] getRepeatedAnnotationUsages(AnnotationDescriptor<X> type, ModelsContext modelContext) Description copied from interface:AnnotationTargetGet all usages of the specifiedannotationTypein this scope.- Specified by:
getRepeatedAnnotationUsagesin interfaceAnnotationTarget- Specified by:
getRepeatedAnnotationUsagesin interfaceAnnotationTargetSupport
-
getRepeatedAnnotationUsages
public <X extends Annotation> X[] getRepeatedAnnotationUsages(Class<X> type, ModelsContext modelContext) Description copied from interface:AnnotationTargetForm of AnnotationTarget.getRepeatedAnnotationUsages(AnnotationDescriptor, ModelsContext) accepting the annotation Class- Specified by:
getRepeatedAnnotationUsagesin interfaceAnnotationTarget
-
asAnnotationDescriptor
Description copied from interface:AnnotationTargetSafe cast method for cases when the target is an annotation.- Specified by:
asAnnotationDescriptorin interfaceAnnotationDescriptor<A extends Annotation>- Specified by:
asAnnotationDescriptorin interfaceAnnotationTarget- Specified by:
asAnnotationDescriptorin interfaceAnnotationTargetSupport
-
asClassDetails
Description copied from interface:AnnotationTarget- Specified by:
asClassDetailsin interfaceAnnotationDescriptor<A extends Annotation>- Specified by:
asClassDetailsin interfaceAnnotationTarget- Specified by:
asClassDetailsin interfaceAnnotationTargetSupport- Specified by:
asClassDetailsin interfaceMutableAnnotationTarget
-
asMemberDetails
Description copied from interface:AnnotationTarget- Specified by:
asMemberDetailsin interfaceAnnotationDescriptor<A extends Annotation>- Specified by:
asMemberDetailsin interfaceAnnotationTarget- Specified by:
asMemberDetailsin interfaceAnnotationTargetSupport- Specified by:
asMemberDetailsin interfaceMutableAnnotationTarget
-
asFieldDetails
Description copied from interface:AnnotationTarget- Specified by:
asFieldDetailsin interfaceAnnotationDescriptor<A extends Annotation>- Specified by:
asFieldDetailsin interfaceAnnotationTarget- Specified by:
asFieldDetailsin interfaceAnnotationTargetSupport
-
asMethodDetails
Description copied from interface:AnnotationTarget- Specified by:
asMethodDetailsin interfaceAnnotationDescriptor<A extends Annotation>- Specified by:
asMethodDetailsin interfaceAnnotationTarget- Specified by:
asMethodDetailsin interfaceAnnotationTargetSupport
-
asRecordComponentDetails
Description copied from interface:AnnotationTargetSafe cast method for cases when the target is a record component.- Specified by:
asRecordComponentDetailsin interfaceAnnotationDescriptor<A extends Annotation>- Specified by:
asRecordComponentDetailsin interfaceAnnotationTarget- Specified by:
asRecordComponentDetailsin interfaceAnnotationTargetSupport
-