Package org.hibernate.models.spi
Interface MutableAnnotationTarget
- All Superinterfaces:
AnnotationTarget
- All Known Subinterfaces:
AnnotationTargetSupport,ClassDetailsSupport,MutableClassDetails,MutableMemberDetails
- All Known Implementing Classes:
AbstractAnnotationTarget,AbstractAnnotationTarget,AbstractAnnotationTarget,AnnotationDescriptorImpl,DynamicClassDetails,DynamicFieldDetails,DynamicMethodDetails,JandexClassDetails,JandexFieldDetails,JandexMethodDetails,JandexRecordComponentDetails,JdkClassDetails,JdkFieldDetails,JdkMethodDetails,JdkRecordComponentDetails
Extension of AnnotationTarget which allows manipulation of the annotations
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.AnnotationTarget
AnnotationTarget.AnnotationUsageProcessor<T>, AnnotationTarget.Kind -
Method Summary
Modifier and TypeMethodDescription<X extends Annotation>
voidaddAnnotationUsage(AnnotationUsage<X> annotationUsage) Add an annotation usage to this targetdefault <A extends Annotation>
MutableAnnotationUsage<A>applyAnnotationUsage(AnnotationDescriptor<A> annotationType, Consumer<MutableAnnotationUsage<A>> configuration, SourceModelBuildingContext buildingContext) Applies a usage of the givenannotationTypeto this target, allowing for configuration of the applied usage.default <A extends Annotation>
MutableAnnotationUsage<A>applyAnnotationUsage(AnnotationDescriptor<A> annotationType, SourceModelBuildingContext buildingContext) Applies a usage of the givenannotationTypeto this target.voidRemoves all annotation usages currently associated with this target.Methods inherited from interface org.hibernate.models.spi.AnnotationTarget
forAllAnnotationUsages, forEachAnnotationUsage, forEachAnnotationUsage, fromAnnotations, getAllAnnotationUsages, getAnnotationUsage, getAnnotationUsage, getKind, getMetaAnnotated, getName, getNamedAnnotationUsage, getNamedAnnotationUsage, getNamedAnnotationUsage, getNamedAnnotationUsage, getRepeatedAnnotationUsages, getRepeatedAnnotationUsages, getSingleAnnotationUsage, getSingleAnnotationUsage, hasAnnotationUsage, hasRepeatableAnnotationUsage, locateAnnotationUsage
-
Method Details
-
clearAnnotationUsages
void clearAnnotationUsages()Removes all annotation usages currently associated with this target. Useful for complete XML mappings. -
addAnnotationUsage
Add an annotation usage to this target -
applyAnnotationUsage
default <A extends Annotation> MutableAnnotationUsage<A> applyAnnotationUsage(AnnotationDescriptor<A> annotationType, SourceModelBuildingContext buildingContext) Applies a usage of the givenannotationTypeto this target. Will return an existing usage, if one, or create a new usage. -
applyAnnotationUsage
default <A extends Annotation> MutableAnnotationUsage<A> applyAnnotationUsage(AnnotationDescriptor<A> annotationType, Consumer<MutableAnnotationUsage<A>> configuration, SourceModelBuildingContext buildingContext) Applies a usage of the givenannotationTypeto this target, allowing for configuration of the applied usage. Will return an existing usage, if one, or create a new usage.
-