001package sting; 002 003import java.lang.annotation.Documented; 004import java.lang.annotation.ElementType; 005import java.lang.annotation.Retention; 006import java.lang.annotation.RetentionPolicy; 007import java.lang.annotation.Target; 008 009/** 010 * Annotation applied to type-targeting annotations that suppresses warnings due to usages of the {@link sting.Named @Named} and {@link sting.ContributeTo @ContributeTo} annotations. 011 * 012 * <p>Normally a type that is annotated with the {@link sting.Named @Named} annotation, the 013 * {@link sting.ContributeTo @ContributeTo} annotation or a type that has a constructor parameter annotated with the 014 * {@link sting.Named @Named} annotation will generate a warning if the Sting annotation processor 015 * detects that the type is not annotated with the {@link sting.Injectable @Injectable} annotation or an annotation 016 * annotated by a {@link sting.StingProvider @StingProvider} annotated annotation. This warning is generated because 017 * the annotation processor will not process the annotation and thus considers it an error.</p> 018 * 019 * <p>The @ActAsStingComponent can be applied to an annotation and any type that is annotated with that annotation 020 * will not generated warnings in these scenarios. The expectation is that another annotation processor will process 021 * the type and will make use of the {@link sting.Named @Named} annotations and/or the 022 * {@link sting.ContributeTo @ContributeTo} annotation if present. This allows other frameworks to define their 023 * own component model that is fully integration with sting.</p> 024 * 025 * <p>It should be noted that Sting will attempt to use any annotation with this name and shape so that 026 * frameworks do not need a direct code dependency on Sting.</p> 027 * 028 * @see InjectorFragment 029 */ 030@Documented 031@Retention( RetentionPolicy.RUNTIME ) 032@Target( ElementType.ANNOTATION_TYPE ) 033public @interface ActAsStingComponent 034{ 035}