@Override
    public String generateClass(
        Context context, String className, String classToExtend, boolean isFinal) {
      generated = true;

      ImmutableList.Builder<String> typesAndNamesBuilder = ImmutableList.builder();
      context.propertyTypes().forEach((name, type) -> typesAndNamesBuilder.add(type + " " + name));
      String typesAndNames = Joiner.on(", ").join(typesAndNamesBuilder.build());
      String template =
          "package {pkg};\n"
              + "\n"
              + "{finalOrAbstract} class {className} extends {classToExtend} {\n"
              + "  {className}({propertyTypesAndNames}) {\n"
              + "    super({propertyNames});\n"
              + "  }\n"
              + "  {extraText}\n"
              + "}\n";
      return template
          .replace("{pkg}", context.packageName())
          .replace("{finalOrAbstract}", isFinal ? "final" : "abstract")
          .replace("{className}", className)
          .replace("{classToExtend}", classToExtend)
          .replace("{propertyTypesAndNames}", typesAndNames)
          .replace("{propertyNames}", Joiner.on(", ").join(context.properties().keySet()))
          .replace("{extraText}", extraText(context));
    }
Tests that extensions providing their own implemented annotation types or options get picked
up.
value/src/test/java/com/google/auto/value/processor/ExtensionTest.java