-
-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Milestone
Description
interface MutableAnnotationTarget ... {
...
/**
* Creates a usage and adds it to this target.
*/
default <A extends Annotation> MutableAnnotationUsage<A> applyAnnotationUsage(
AnnotationDescriptor<A> annotationType,
SourceModelBuildingContext buildingContext) {
return applyAnnotationUsage( annotationType, null, buildingContext );
}
/**
* Creates a usage and adds it to this target, allowing for configuration of the created usage
*/
default <A extends Annotation> MutableAnnotationUsage<A> applyAnnotationUsage(
AnnotationDescriptor<A> annotationType,
Consumer<MutableAnnotationUsage<A>> configuration,
SourceModelBuildingContext buildingContext) {
final MutableAnnotationUsage<A> usage = annotationType.createUsage( this, configuration, buildingContext );
addAnnotationUsage( usage );
return usage;
}