code: void generate(T input) throws SourceFileGenerationException {
      ClassName generatedTypeName = nameGeneratedType(input);
      try {
        Optional<TypeSpec.Builder> type = write(generatedTypeName, input);
        if (!type.isPresent()) {
          return;
        }
        buildJavaFile(generatedTypeName, type.get()).writeTo(filer);
      } catch (Exception e) {
        // if the code above threw a SFGE, use that
        Throwables.propagateIfPossible(e, SourceFileGenerationException.class);
        // otherwise, throw a new one
        throw new SourceFileGenerationException(
            Optional.<ClassName>absent(), e, getElementForErrorReporting(input));
      }
    }
docs: Generates a source file to be compiled for {@code T}.