diff --git a/value/src/main/java/com/google/auto/value/AutoValue.java b/value/src/main/java/com/google/auto/value/AutoValue.java index d77659de06..5a9a2eed1c 100644 --- a/value/src/main/java/com/google/auto/value/AutoValue.java +++ b/value/src/main/java/com/google/auto/value/AutoValue.java @@ -86,6 +86,12 @@ * {@link java.lang.annotation.Inherited} meta-annotation. * * + *
For historical reasons, annotations are always copied from an {@code @AutoValue} property + * method to its implementation, unless {@code @CopyAnnotations} is present and explicitly + * {@linkplain CopyAnnotations#exclude excludes} that annotation. But annotations are not copied + * from the {@code @AutoValue} class itself to its implementation unless {@code @CopyAnnotations} + * is present. + * *
When the type of an {@code @AutoValue} property method has annotations, those are * part of the type, so they are always copied to the implementation of the method. * {@code @CopyAnnotations} has no effect here. For example, suppose {@code @Confidential} is a