Skip to content

Commit

Permalink
Uglify the AutoFactory javadoc to work around bugs in older javadoc v…
Browse files Browse the repository at this point in the history
…ersions.

Specifically, these problems show up in the GitHub CI.

RELNOTES=n/a
PiperOrigin-RevId: 541921547
  • Loading branch information
eamonnmcmanus authored and Google Java Core Libraries committed Jun 20, 2023
1 parent d4b2d06 commit ee2cf8d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions factory/src/main/java/com/google/auto/factory/AutoFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,36 +67,36 @@
/**
* Specifies that an annotation should be used to determine how to annotate generated AutoFactory
* classes. For example, suppose you have this annotation:
* <pre>{@code
* @AutoFactory.AnnotationsToApply
* @interface ApplyImmutableAndSuppressWarnings {
* <pre>
* {@code @AutoFactory.AnnotationsToApply}
* {@code @interface} ApplyImmutableAndSuppressWarnings {
* Immutable immutable() default @Immutable;
* SuppressWarnings suppressWarnings() default @SuppressWarnings("Immutable");
* }
* }</pre>
* </pre>
*
* And suppose you use it like this:
* <pre>{@code
* @ApplyImmutableAndSuppressWarnings
* @AutoFactory
* <pre>
* {@code @ApplyImmutableAndSuppressWarnings}
* {@code @AutoFactory}
* public class Foo {...}
* }</pre>
* </pre>
*
* Then the generated {@code FooFactory} would look like this:
* <pre>{@code
* @Immutable
* @SuppressWarnings("Immutable")
* <pre>
* {@code @Immutable}
* {@code @SuppressWarnings("Immutable")}
* public class FooFactory {...}
* }</pre>
* </pre>
*
* The same would be true if you used it like this:
* <pre>{@code
* @ApplyImmutableAndSuppressWarnings(
* <pre>
* {@code @ApplyImmutableAndSuppressWarnings}(
* immutable = @Immutable,
* suppressWarnings = @SuppressWarnings("Immutable"))
* @AutoFactory
* {@code @AutoFactory}
* public class Foo {...}
* }</pre>
* </pre>
*
* You could also have {@code suppressWarnings = @SuppressWarnings({"Immutable", "unchecked"})},
* etc, to specify a value different from the default.
Expand Down

0 comments on commit ee2cf8d

Please sign in to comment.