@Override
    public String generateClass(
        Context context, String className, String classToExtend, boolean isFinal) {
      String sideClassName = "Side_" + context.autoValueClass().getSimpleName();
      String sideClass =
          "" //
              + "package "
              + context.packageName()
              + ";\n"
              + "class "
              + sideClassName
              + " {}\n";
      Filer filer = context.processingEnvironment().getFiler();
      try {
        String sideClassFqName = context.packageName() + "." + sideClassName;
        JavaFileObject sourceFile =
            filer.createSourceFile(sideClassFqName, context.autoValueClass());
        try (Writer sourceWriter = sourceFile.openWriter()) {
          sourceWriter.write(sideClass);
        }
      } catch (IOException e) {
        context
            .processingEnvironment()
            .getMessager()
            .printMessage(Diagnostic.Kind.ERROR, e.toString());
      }
      return null;
    }
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