Closed sebersole closed 3 months ago
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; }