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 suppress warnings due to usages of
011 * {@link sting.Named @Named}, {@link sting.Typed @Typed}, and {@link sting.Eager @Eager}. This is
012 * an integration meta-annotation rather than a component-defining Sting annotation.
013 *
014 * <p>When a type is annotated with an annotation meta-annotated by {@link ActAsStingComponent},
015 * Sting applies the combined validation behavior of {@link ActAsStingConsumer} and
016 * {@link ActAsStingProvider}. In practice this means Sting tolerates {@link sting.Named @Named}
017 * on constructor parameters, and tolerates {@link sting.Named @Named},
018 * {@link sting.Typed @Typed}, and {@link sting.Eager @Eager} on the type, without treating that
019 * type as a Sting-managed component. The expectation is that another annotation processor will
020 * process the type and make use of the metadata if present.</p>
021 *
022 * <p>This annotation only affects validation. It does not participate in explicit include
023 * resolution, provider-backed auto-discovery, or any other graph construction step.</p>
024 *
025 * <p>It should be noted that Sting will attempt to use any annotation with this name and shape so
026 * that 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}