Class BuilderSpec

java.lang.Object
com.google.auto.value.processor.BuilderSpec

class BuilderSpec extends Object
Support for AutoValue builders.
  • Field Details

    • autoValueClass

      private final TypeElement autoValueClass
    • processingEnv

      private final ProcessingEnvironment processingEnv
    • errorReporter

      private final ErrorReporter errorReporter
    • CLASS_OR_INTERFACE

      private static final com.google.common.collect.ImmutableSet<ElementKind> CLASS_OR_INTERFACE
  • Constructor Details

  • Method Details

    • getBuilder

      Determines if the @AutoValue class for this instance has a correct nested @AutoValue.Builder class or interface and return a representation of it in an Optional if so.
    • builderFrom

      private Optional<BuilderSpec.Builder> builderFrom(TypeElement builderTypeElement)
      Returns a representation of the given @AutoValue.Builder class or interface. If the class or interface has abstract methods that could not be part of any builder, emits error messages and returns Optional.empty().
    • sameTypeParameters

      private static boolean sameTypeParameters(TypeElement a, TypeElement b)
    • abstractMethods

      private Set<ExecutableElement> abstractMethods(TypeElement typeElement)
    • typeParamsString

      private String typeParamsString()