Annotation Type AutoFactory.AnnotationsToApply


  • @Target(ANNOTATION_TYPE)
    public static @interface AutoFactory.AnnotationsToApply
    Specifies that an annotation should be used to determine how to annotate generated AutoFactory classes. For example, suppose you have this annotation:
     @AutoFactory.AnnotationsToApply
     @interface ApplyImmutableAndSuppressWarnings {
       Immutable immutable() default @Immutable;
       SuppressWarnings suppressWarnings() default @SuppressWarnings("Immutable");
     }
     
    And suppose you use it like this:
     @ApplyImmutableAndSuppressWarnings
     @AutoFactory
     public class Foo {...}
     
    Then the generated FooFactory would look like this:
     @Immutable
     @SuppressWarnings("Immutable")
     public class FooFactory {...}
     
    The same would be true if you used it like this:
     @ApplyImmutableAndSuppressWarnings(
         immutable = @Immutable,
         suppressWarnings = @SuppressWarnings("Immutable"))
     @AutoFactory
     public class Foo {...}
     
    You could also have suppressWarnings = @SuppressWarnings({"Immutable", "unchecked"}), etc, to specify a value different from the default.