private TypeName superType() {
    ClassName superType = ClassName.get(context.packageName(), classToExtend);
    ImmutableList<TypeVariableName> typeVariableNames = typeVariableNames();

    return typeVariableNames.isEmpty()
        ? superType
        : ParameterizedTypeName.get(superType, typeVariableNames.toArray(new TypeName[] {}));
  }
A factory for {@link TypeSpec}s used in {@link AutoValueExtension} implementations.

<p>This is copied from {@link
com.google.auto.value.extension.memoized.processor.MemoizeExtension} until we find a better
location to consolidate the code.
value/src/main/java/com/google/auto/value/extension/toprettystring/processor/ExtensionClassTypeSpecBuilder.java