@Override
  public String generateClass(
      Context context, String className, String classToExtend, boolean isFinal) {
    String templateString = Joiner.on('\n').join(TEMPLATE_LINES);
    StringReader templateReader = new StringReader(templateString);
    Template template;
    try {
      template = Template.parseFrom(templateReader);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    TypeElement autoValueClass = context.autoValueClass();
    ImmutableMap<String, Object> vars =
        ImmutableMap.<String, Object>builder()
            .put("package", context.packageName())
            .put("className", className)
            .put("classToExtend", classToExtend)
            .put("isFinal", isFinal)
            .put("propertyTypes", context.propertyTypes())
            .put("formalTypes", formalTypeParametersString(autoValueClass))
            .put("actualTypes", actualTypeParametersString(autoValueClass))
            .build();
    return template.evaluate(vars);
  }
An AutoValue extension that generates a subclass that does nothing useful.
value/src/it/functional/src/test/java/com/google/auto/value/gwt/EmptyExtension.java