diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d1992068e..28b59e60e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,10 +86,10 @@ jobs: key: maven-${{ hashFiles('**/pom.xml') }} restore-keys: | maven- - - name: 'Set up JDK 11' + - name: 'Set up JDK 17' # need 15+ to avoid https://bugs.openjdk.org/browse/JDK-8241780 uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 with: - java-version: 11 + java-version: 17 distribution: 'zulu' - name: 'Generate latest docs' env: diff --git a/common/src/main/java/com/google/auto/common/BasicAnnotationProcessor.java b/common/src/main/java/com/google/auto/common/BasicAnnotationProcessor.java index ff6793b8a7..e2381d1149 100644 --- a/common/src/main/java/com/google/auto/common/BasicAnnotationProcessor.java +++ b/common/src/main/java/com/google/auto/common/BasicAnnotationProcessor.java @@ -367,16 +367,16 @@ private ImmutableSetMultimap indexByAnnotation( * {@code @X}, then {@code Outer}, {@code Outer.foo}, and {@code Outer.foo()} will be added to the * multimap, but neither {@code Inner} nor its members will. * - *

-   *   {@literal @}X class Outer {
-   *     {@literal @}X Object foo;
-   *     {@literal @}X void foo() {}
-   *     {@literal @}X static class Inner {
-   *       {@literal @}X Object bar;
-   *       {@literal @}X void bar() {}
-   *     }
+   * 
{@code
+   * @X class Outer {
+   *   @X Object foo;
+   *   @X void foo() {}
+   *   @X static class Inner {
+   *     @X Object bar;
+   *     @X void bar() {}
    *   }
-   * 
+ * } + * }
*/ private static void findAnnotatedElements( Element element, diff --git a/common/src/main/java/com/google/auto/common/MoreElements.java b/common/src/main/java/com/google/auto/common/MoreElements.java index 866d6ffff4..2acb3f7d48 100644 --- a/common/src/main/java/com/google/auto/common/MoreElements.java +++ b/common/src/main/java/com/google/auto/common/MoreElements.java @@ -309,16 +309,17 @@ public static Predicate hasModifiers(Modifier... modifier } /** - * Returns a {@link Predicate} that can be used to filter elements by {@link Modifier}. - * The predicate returns {@code true} if the input {@link Element} has all of the given - * {@code modifiers}, perhaps in addition to others. + * Returns a {@link Predicate} that can be used to filter elements by {@link Modifier}. The + * predicate returns {@code true} if the input {@link Element} has all of the given {@code + * modifiers}, perhaps in addition to others. * *

Here is an example how one could get a List of methods with certain modifiers of a class: + * *

{@code
    * Set modifiers = ...;
    * FluentIterable.from(ElementFilter.methodsIn(clazzElement.getEnclosedElements()))
-   *     .filter(MoreElements.hasModifiers(modifiers)).toList();}
-   * 
+ * .filter(MoreElements.hasModifiers(modifiers)).toList(); + * } */ public static Predicate hasModifiers(final Set modifiers) { return new Predicate() { diff --git a/factory/src/main/java/com/google/auto/factory/AutoFactory.java b/factory/src/main/java/com/google/auto/factory/AutoFactory.java index 3feecd4cfe..e1870f3692 100644 --- a/factory/src/main/java/com/google/auto/factory/AutoFactory.java +++ b/factory/src/main/java/com/google/auto/factory/AutoFactory.java @@ -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: - *
-   * {@code @AutoFactory.AnnotationsToApply}
-   * {@code @interface} ApplyImmutableAndSuppressWarnings {
+   * 
{@code
+   * @AutoFactory.AnnotationsToApply
+   * @interface ApplyImmutableAndSuppressWarnings {
    *   Immutable immutable() default @Immutable;
    *   SuppressWarnings suppressWarnings() default @SuppressWarnings("Immutable");
    * }
-   * 
+ * }
* * And suppose you use it like this: - *
-   * {@code @ApplyImmutableAndSuppressWarnings}
-   * {@code @AutoFactory}
+   * 
{@code
+   * @ApplyImmutableAndSuppressWarnings
+   * @AutoFactory
    * public class Foo {...}
-   * 
+ * }
* * Then the generated {@code FooFactory} would look like this: - *
-   * {@code @Immutable}
-   * {@code @SuppressWarnings("Immutable")}
+   * 
{@code
+   * @Immutable
+   * @SuppressWarnings("Immutable")
    * public class FooFactory {...}
-   * 
+ * }
* * The same would be true if you used it like this: - *
-   * {@code @ApplyImmutableAndSuppressWarnings}(
+   * 
{@code
+   * @ApplyImmutableAndSuppressWarnings(
    *     immutable = @Immutable,
    *     suppressWarnings = @SuppressWarnings("Immutable"))
-   * {@code @AutoFactory}
+   * @AutoFactory
    * public class Foo {...}
-   * 
+ * }
* * You could also have {@code suppressWarnings = @SuppressWarnings({"Immutable", "unchecked"})}, * etc, to specify a value different from the default. diff --git a/value/src/main/java/com/google/auto/value/AutoAnnotation.java b/value/src/main/java/com/google/auto/value/AutoAnnotation.java index 3360d80e74..04adda1fba 100644 --- a/value/src/main/java/com/google/auto/value/AutoAnnotation.java +++ b/value/src/main/java/com/google/auto/value/AutoAnnotation.java @@ -30,22 +30,24 @@ * *

For example, suppose you have an annotation like this: * - *

+ * 
{@code
  * package com.google.inject.name;
  *
- * public @interface Named {
+ * public @interface Named {
  *   String value();
+ * }
  * }
* *

You could write a method like this to construct implementations of the interface: * - *

+ * 
{@code
  * package com.example;
  *
  * public class Names {
- *   @AutoAnnotation public static Named named(String value) {
+ *   @AutoAnnotation public static Named named(String value) {
  *     return new AutoAnnotation_Names_named(value);
  *   }
+ * }
  * }
* *

Because the annotated method is called {@code Names.named}, the generated class is called @@ -75,14 +77,14 @@ * {@code @AutoAnnotation} to make it easier to construct instances. In that case, {@code default} * values from the annotation will become default values for the values in the builder. For example: * - *

+ * 
{@code
  * class Example {
- *   {@code @interface} MyAnnotation {
+ *   @interface MyAnnotation {
  *     String name() default "foo";
  *     int number() default 23;
  *   }
  *
- *   {@code @AutoBuilder(ofClass = MyAnnotation.class)}
+ *   @AutoBuilder(ofClass = MyAnnotation.class)
  *   interface MyAnnotationBuilder {
  *     MyAnnotationBuilder name(String name);
  *     MyAnnotationBuilder number(int number);
@@ -93,7 +95,7 @@
  *     return new AutoBuilder_Example_MyAnnotationBuilder();
  *   }
  * }
- * 
+ * }
* * Here, {@code myAnnotationBuilder().build()} is the same as {@code * myAnnotationBuilder().name("foo").number(23).build()} because those are the defaults in the diff --git a/value/src/main/java/com/google/auto/value/AutoBuilder.java b/value/src/main/java/com/google/auto/value/AutoBuilder.java index bfdaf84f1a..a4df5bba21 100644 --- a/value/src/main/java/com/google/auto/value/AutoBuilder.java +++ b/value/src/main/java/com/google/auto/value/AutoBuilder.java @@ -25,22 +25,22 @@ * *

A simple example: * - *

- *
- *   {@code @}AutoBuilder(ofClass = Person.class)
- *   abstract class PersonBuilder {
- *     static PersonBuilder builder() {
- *       return new AutoBuilder_PersonBuilder();
- *     }
- *
- *     abstract PersonBuilder setName(String name);
- *     abstract PersonBuilder setId(int id);
- *     abstract Person build();
- *   }
+ *
{@code
+ * @AutoBuilder(ofClass = Person.class)
+ * abstract class PersonBuilder {
+ *   static PersonBuilder builder() {
+ *     return new AutoBuilder_PersonBuilder();
+ *   }
+ *
+ *   abstract PersonBuilder setName(String name);
+ *   abstract PersonBuilder setId(int id);
+ *   abstract Person build();
+ * }
+ * }
* * @see AutoBuilder - * User's Guide + * href="https://github.com/google/auto/blob/main/value/userguide/autobuilder.md">AutoBuilder + * User's Guide */ @Retention(RetentionPolicy.CLASS) @Target(ElementType.TYPE) diff --git a/value/src/main/java/com/google/auto/value/AutoOneOf.java b/value/src/main/java/com/google/auto/value/AutoOneOf.java index 79f33289fd..aebb96993f 100644 --- a/value/src/main/java/com/google/auto/value/AutoOneOf.java +++ b/value/src/main/java/com/google/auto/value/AutoOneOf.java @@ -27,7 +27,8 @@ * abstract methods define a set of properties. But unlike {@code @AutoValue}, only one of those * properties is defined in any given instance. * - *
{@code @AutoOneOf(StringOrInteger.Kind.class)
+ * 
{@code
+ * @AutoOneOf(StringOrInteger.Kind.class)
  * public abstract class StringOrInteger {
  *   public enum Kind {STRING, INTEGER}
  *
@@ -53,7 +54,8 @@
  *       return "the integer " + stringOrInteger.integer();
  *   }
  *   throw new AssertionError();
- * }}
+ * } + * }
* *

{@code @AutoOneOf} is explained in more detail in the user guide. 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 205002a95c..141488aa4b 100644 --- a/value/src/main/java/com/google/auto/value/AutoValue.java +++ b/value/src/main/java/com/google/auto/value/AutoValue.java @@ -25,17 +25,17 @@ * {@link Object} methods like {@link Object#equals equals} to have conventional value semantics. A * simple example: * - *

+ * 
{@code
+ * @AutoValue
+ * abstract class Person {
+ *   static Person create(String name, int id) {
+ *     return new AutoValue_Person(name, id);
+ *   }
  *
- *   {@code @}AutoValue
- *   abstract class Person {
- *     static Person create(String name, int id) {
- *       return new AutoValue_Person(name, id);
- *     }
- *
- *     abstract String name();
- *     abstract int id();
- *   }
+ * abstract String name(); + * abstract int id(); + * } + * }
* * @see AutoValue User's Guide * @author Éamonn McManus @@ -51,24 +51,24 @@ * here is an alternative way to write the {@code Person} class mentioned in the {@link AutoValue} * example: * - *
-   *
-   *   {@code @}AutoValue
-   *   abstract class Person {
-   *     static Builder builder() {
-   *       return new AutoValue_Person.Builder();
-   *     }
-   *
-   *     abstract String name();
-   *     abstract int id();
-   *
-   *     {@code @}AutoValue.Builder
-   *     interface Builder {
-   *       Builder name(String x);
-   *       Builder id(int x);
-   *       Person build();
-   *     }
-   *   }
+ *
{@code
+   * @AutoValue
+   * abstract class Person {
+   *   static Builder builder() {
+   *     return new AutoValue_Person.Builder();
+   *   }
+   *
+   *   abstract String name();
+   *   abstract int id();
+   *
+   *   @AutoValue.Builder
+   *   interface Builder {
+   *     Builder name(String x);
+   *     Builder id(int x);
+   *     Person build();
+   *   }
+   * }
+   * }
* * @author Éamonn McManus */ @@ -96,59 +96,63 @@ * is present. * *

If you want to copy annotations from your {@literal @}AutoValue-annotated class's methods to - * the generated fields in the AutoValue_... implementation, annotate your method - * with {@literal @}AutoValue.CopyAnnotations. For example, if Example.java is:

-   *
-   *   {@code @}Immutable
-   *   {@code @}AutoValue
-   *   abstract class Example {
-   *     {@code @}CopyAnnotations
-   *     {@code @}SuppressWarnings("Immutable") // justification ...
-   *     abstract Object getObject();
-   *     // other details ...
-   *   }
- * - *

Then AutoValue will generate the following AutoValue_Example.java:

-   *
-   *   final class AutoValue_Example extends Example {
-   *     {@code @}SuppressWarnings("Immutable")
-   *     private final Object object;
-   *
-   *     {@code @}SuppressWarnings("Immutable")
-   *     {@code @}Override
-   *     Object getObject() {
-   *       return object;
-   *     }
-   *
-   *     // other details ...
-   *   }
+ * the generated fields in the AutoValue_... implementation, annotate your method with + * {@literal @}AutoValue.CopyAnnotations. For example, if Example.java is: + * + *
{@code
+   * @Immutable
+   * @AutoValue
+   * abstract class Example {
+   *   @CopyAnnotations
+   *   @SuppressWarnings("Immutable") // justification ...
+   *   abstract Object getObject();
+   *   // other details ...
+   * }
+   * }
+ * + *

Then AutoValue will generate the following AutoValue_Example.java: + * + *

{@code
+   * final class AutoValue_Example extends Example {
+   *   @SuppressWarnings("Immutable")
+   *   private final Object object;
+   *
+   *   @SuppressWarnings("Immutable")
+   *   @Override
+   *   Object getObject() {
+   *     return object;
+   *   }
+   *
+   *   // other details ...
+   * }
+   * }
* *

When the type of an {@code @AutoValue} property method has annotations, those are - * part of the type, so by default they are copied to the implementation of the method. But if - * a type annotation is mentioned in {@code exclude} then it is not copied. + * part of the type, so by default they are copied to the implementation of the method. But if a + * type annotation is mentioned in {@code exclude} then it is not copied. * - *

For example, suppose {@code @Confidential} is a - * {@link java.lang.annotation.ElementType#TYPE_USE TYPE_USE} annotation: + *

For example, suppose {@code @Confidential} is a {@link + * java.lang.annotation.ElementType#TYPE_USE TYPE_USE} annotation: * - *

+   * 
{@code
+   * @AutoValue
+   * abstract class Person {
+   *   static Person create(@Confidential String name, int id) {
+   *     return new AutoValue_Person(name, id);
+   *   }
    *
-   *   {@code @}AutoValue
-   *   abstract class Person {
-   *     static Person create({@code @}Confidential String name, int id) {
-   *       return new AutoValue_Person(name, id);
-   *     }
-   *
-   *     abstract {@code @}Confidential String name();
-   *     abstract int id();
-   *   }
+ * abstract @Confidential String name(); + * abstract int id(); + * } + * }
* * Then the implementation of the {@code name()} method will also have return type * {@code @Confidential String}. But if {@code name()} were written like this... * - *
-   *
-   *     {@code @AutoValue.CopyAnnotations(exclude = Confidential.class)}
-   *     abstract {@code @}Confidential String name();
+ *
{@code
+   * @AutoValue.CopyAnnotations(exclude = Confidential.class)
+   * abstract @Confidential String name();
+   * }
* *

...then the implementation of {@code name()} would have return type {@code String} without * the annotation. diff --git a/value/src/main/java/com/google/auto/value/extension/AutoValueExtension.java b/value/src/main/java/com/google/auto/value/extension/AutoValueExtension.java index 7b5e40f7ec..23ad9a6b61 100644 --- a/value/src/main/java/com/google/auto/value/extension/AutoValueExtension.java +++ b/value/src/main/java/com/google/auto/value/extension/AutoValueExtension.java @@ -46,12 +46,12 @@ * the first Extension to generate a subclass of that, and the second Extension to generate a * subclass of the subclass. So we might have this hierarchy: * - *

- * @AutoValue abstract class Foo {...}                          // the hand-written class
+ * 
{@code
+ * @AutoValue abstract class Foo {...}                          // the hand-written class
  * abstract class $$AutoValue_Foo extends Foo {...}             // generated by AutoValue processor
  * abstract class $AutoValue_Foo extends $$AutoValue_Foo {...}  // generated by first Extension
  * final class AutoValue_Foo extends $AutoValue_Foo {...}       // generated by second Extension
- * 
+ * }
* *

(The exact naming scheme illustrated here is not fixed and should not be relied on.) * @@ -123,11 +123,12 @@ default String finalAutoValueClassName() { * that the final type of the property might be different because of type variables. For * example, if you have... * - *

-     *   {@code interface Parent} {
-     *     T bar();
-     *   }
-     *  {@code @AutoValue abstract class Foo implements Parent {...}}
+ *
{@code
+     * interface Parent {
+     *   T bar();
+     * }
+     * @AutoValue abstract class Foo implements Parent {...}
+     * }
* * ...then the type of the {@code bar} property in {@code Foo} is actually {@code String}, but * the {@code ExecutableElement} will be the the method in {@code Parent}, whose return type is @@ -225,17 +226,17 @@ public interface BuilderContext { * *

Consider a class like this: * - *

-     *   {@code @AutoValue} abstract class Foo {
-     *     abstract String bar();
+     * 
{@code
+     * @AutoValue abstract class Foo {
+     *   abstract String bar();
      *
-     *     abstract Builder toBuilder();
+     *   abstract Builder toBuilder();
      *
-     *     ...
-     *     {@code @AutoValue.Builder}
-     *     abstract static class Builder {...}
-     *   }
-     * 
+ * ... + * @AutoValue.Builder + * abstract static class Builder {...} + * } + * }
* *

Here {@code toBuilderMethods()} will return a set containing the method {@code * Foo.toBuilder()}. @@ -248,22 +249,22 @@ public interface BuilderContext { * *

Consider a class like this: * - *

-     *   {@code @AutoValue} abstract class Foo {
-     *     abstract String bar();
+     * 
{@code
+     * @AutoValue abstract class Foo {
+     *   abstract String bar();
      *
-     *     static Builder builder() {
-     *       return new AutoValue_Foo.Builder()
-     *           .setBar("default bar");
-     *     }
+     *   static Builder builder() {
+     *     return new AutoValue_Foo.Builder()
+     *         .setBar("default bar");
+     *   }
      *
-     *     {@code @AutoValue.Builder}
-     *     abstract class Builder {
-     *       abstract Builder setBar(String x);
-     *       abstract Foo build();
-     *     }
+     *   @AutoValue.Builder
+     *   abstract class Builder {
+     *     abstract Builder setBar(String x);
+     *     abstract Foo build();
      *   }
-     * 
+ * } + * }
* *

Here {@code builderMethods()} will return a set containing the method {@code * Foo.builder()}. Generated code should usually call this method in preference to constructing diff --git a/value/src/main/java/com/google/auto/value/extension/memoized/Memoized.java b/value/src/main/java/com/google/auto/value/extension/memoized/Memoized.java index 6eefd07c35..c6106e0bff 100644 --- a/value/src/main/java/com/google/auto/value/extension/memoized/Memoized.java +++ b/value/src/main/java/com/google/auto/value/extension/memoized/Memoized.java @@ -49,35 +49,36 @@ * *

Example

* - *
- *   {@code @AutoValue}
- *   abstract class Value {
- *     abstract String stringProperty();
+ * 
{@code
+ * @AutoValue
+ * abstract class Value {
+ *   abstract String stringProperty();
  *
- *     {@code @Memoized}
- *     String derivedProperty() {
- *       return someCalculationOn(stringProperty());
- *     }
+ *   @Memoized
+ *   String derivedProperty() {
+ *     return someCalculationOn(stringProperty());
  *   }
+ * }
  *
- *   {@code @Generated}
- *   class AutoValue_Value {
- *     // …
+ * @Generated
+ * class AutoValue_Value {
+ *   // …
  *
- *     private volatile String derivedProperty;
+ *   private volatile String derivedProperty;
  *
- *     {@code Override}
- *     String derivedProperty() {
- *       if (derivedProperty == null) {
- *         synchronized (this) {
- *           if (derivedProperty == null) {
- *             derivedProperty = super.derivedProperty();
- *           }
+ *   @Override
+ *   String derivedProperty() {
+ *     if (derivedProperty == null) {
+ *       synchronized (this) {
+ *         if (derivedProperty == null) {
+ *           derivedProperty = super.derivedProperty();
  *         }
  *       }
- *       return derivedProperty;
  *     }
- *   }
+ * return derivedProperty; + * } + * } + * }
*/ @Documented @Retention(CLASS) diff --git a/value/src/main/java/com/google/auto/value/extension/toprettystring/ToPrettyString.java b/value/src/main/java/com/google/auto/value/extension/toprettystring/ToPrettyString.java index 9532fc0e46..fd72602200 100644 --- a/value/src/main/java/com/google/auto/value/extension/toprettystring/ToPrettyString.java +++ b/value/src/main/java/com/google/auto/value/extension/toprettystring/ToPrettyString.java @@ -43,25 +43,25 @@ * *

Example

* - *
- *   {@code @AutoValue}
- *   abstract class Pretty {
- *     abstract {@code List} property();
+ * 
{@code
+ * @AutoValue
+ * abstract class Pretty {
+ *   abstract List property();
  *
- *     {@code @ToPrettyString}
- *     abstract String toPrettyString();
- *   }
+ *   @ToPrettyString
+ *   abstract String toPrettyString();
+ * }
  *
- *   System.out.println(new AutoValue_Pretty(List.of("abc", "def", "has\nnewline)).toPrettyString())
- *   // Pretty{
- *   //   property = [
- *   //     abc,
- *   //     def,
- *   //     has
- *   //     newline,
- *   //   ]
- *   // }
- *   }
+ * System.out.println(new AutoValue_Pretty(List.of("abc", "def", "has\nnewline")).toPrettyString()) + * // Pretty{ + * // property = [ + * // abc, + * // def, + * // has + * // newline, + * // ] + * // } + * }
*/ @Documented @Target(METHOD) diff --git a/value/src/main/java/com/google/auto/value/processor/BuilderSpec.java b/value/src/main/java/com/google/auto/value/processor/BuilderSpec.java index d2ac16e1ba..1a83cb7324 100644 --- a/value/src/main/java/com/google/auto/value/processor/BuilderSpec.java +++ b/value/src/main/java/com/google/auto/value/processor/BuilderSpec.java @@ -221,15 +221,15 @@ ImmutableSet builderAbstractMethods() { * parameters must be the same as those of the {@code @AutoValue} class. Here's a correct * example: * - *
-     * {@code @AutoValue abstract class Foo {
+     * 
{@code
+     * @AutoValue abstract class Foo {
      *   abstract int someProperty();
      *
      *   abstract Builder toBuilder();
      *
      *   interface Builder {...}
-     * }}
-     * 
+ * } + * }
* *

We currently impose that there cannot be more than one such method. */ diff --git a/value/src/main/java/com/google/auto/value/processor/ForwardingClassGenerator.java b/value/src/main/java/com/google/auto/value/processor/ForwardingClassGenerator.java index 946b4ec0cb..e70a7a41d2 100644 --- a/value/src/main/java/com/google/auto/value/processor/ForwardingClassGenerator.java +++ b/value/src/main/java/com/google/auto/value/processor/ForwardingClassGenerator.java @@ -51,7 +51,7 @@ * generate a class file, say {@code Forwarder}, that is basically what you would get if you could * compile this: * - *

+ * 
{@code
  * final class Forwarder {
  *   private Forwarder() {}
  *
@@ -59,7 +59,7 @@
  *     return new ConstructMe(a, b, c);
  *   }
  * }
- * 
+ * }
* *

Because the class file is assembled directly, rather than being produced by the Java compiler, * it can call the synthetic constructor. Then regular Java source code can do {@code diff --git a/value/src/main/java/com/google/auto/value/processor/TypeVariables.java b/value/src/main/java/com/google/auto/value/processor/TypeVariables.java index 96098d8b45..d86d2b4ecf 100644 --- a/value/src/main/java/com/google/auto/value/processor/TypeVariables.java +++ b/value/src/main/java/com/google/auto/value/processor/TypeVariables.java @@ -48,17 +48,17 @@ private TypeVariables() {} * Returns a map from methods to return types, where the return types are not necessarily the * original return types of the methods. Consider this example: * - *

-   * @AutoValue class {@code Foo} {
+   * 
{@code
+   * @AutoValue class Foo {
    *   abstract T getFoo();
    *
-   *   @AutoValue.Builder
-   *   abstract class {@code Builder} {
+   *   @AutoValue.Builder
+   *   abstract class Builder {
    *     abstract Builder setFoo(T t);
-   *     abstract {@code Foo} build();
+   *     abstract Foo build();
    *   }
    * }
-   * 
+ * }
* * We want to be able to check that the parameter type of {@code setFoo} is the same as the return * type of {@code getFoo}. But in fact it isn't, because the {@code T} of {@code Foo} is not @@ -113,10 +113,10 @@ static ImmutableMap rewriteReturnTypes( * {@code static ImmutableMap copyOf(Map)}
* and we want to know if we can do this: * - *
-   * {@code ImmutableMap actualParameter = ...;}
-   * {@code ImmutableMap target = ImmutableMap.copyOf(actualParameter);}
-   * 
+ *
{@code
+   * ImmutableMap actualParameter = ...;
+   * ImmutableMap target = ImmutableMap.copyOf(actualParameter);
+   * }
* * We will infer {@code K=String}, {@code V=Number} based on the target type, and then rewrite the * formal parameter type from