Class AbstractAnnotationTarget
java.lang.Object
org.hibernate.models.internal.jdk.AbstractAnnotationTarget
- All Implemented Interfaces:
AnnotationTargetSupport,AnnotationTarget,MutableAnnotationTarget
- Direct Known Subclasses:
AnnotationDescriptorImpl,JdkClassDetails,JdkFieldDetails,JdkMethodDetails,JdkRecordComponentDetails
AnnotationTarget where we know the annotations up front, but
want to delay processing them until (unless!) they are needed
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.AnnotationTarget
AnnotationTarget.AnnotationUsageProcessor<T>, AnnotationTarget.Kind -
Constructor Summary
ConstructorsConstructorDescriptionAbstractAnnotationTarget(Supplier<Annotation[]> annotationSupplier, SourceModelBuildingContext buildingContext) -
Method Summary
Modifier and TypeMethodDescription<X extends Annotation>
voidaddAnnotationUsage(AnnotationUsage<X> annotationUsage) Add an annotation usage to this targetvoidRemoves all annotation usages currently associated with this target.Map<Class<? extends Annotation>,AnnotationUsage<? extends Annotation>> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.models.spi.AnnotationTarget
forAllAnnotationUsages, forEachAnnotationUsage, fromAnnotations, getKind, getName, getNamedAnnotationUsage, getSingleAnnotationUsage, getSingleAnnotationUsageMethods inherited from interface org.hibernate.models.internal.AnnotationTargetSupport
forEachAnnotationUsage, getAllAnnotationUsages, getAnnotationUsage, getAnnotationUsage, getMetaAnnotated, getNamedAnnotationUsage, getNamedAnnotationUsage, getNamedAnnotationUsage, getRepeatedAnnotationUsages, getRepeatedAnnotationUsages, hasAnnotationUsage, hasRepeatableAnnotationUsage, locateAnnotationUsageMethods inherited from interface org.hibernate.models.spi.MutableAnnotationTarget
applyAnnotationUsage, applyAnnotationUsage
-
Constructor Details
-
AbstractAnnotationTarget
public AbstractAnnotationTarget(Supplier<Annotation[]> annotationSupplier, SourceModelBuildingContext buildingContext)
-
-
Method Details
-
getBuildingContext
- Specified by:
getBuildingContextin interfaceAnnotationTargetSupport
-
getUsageMap
- Specified by:
getUsageMapin interfaceAnnotationTargetSupport
-
clearAnnotationUsages
public void clearAnnotationUsages()Description copied from interface:MutableAnnotationTargetRemoves all annotation usages currently associated with this target. Useful for complete XML mappings.- Specified by:
clearAnnotationUsagesin interfaceMutableAnnotationTarget
-
addAnnotationUsage
Description copied from interface:MutableAnnotationTargetAdd an annotation usage to this target- Specified by:
addAnnotationUsagein interfaceMutableAnnotationTarget
-