Class BuilderSpec
java.lang.Object
com.google.auto.value.processor.BuilderSpec
Support for AutoValue builders.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classRepresentation of anAutoValue.Builderclass or interface.static classInformation about a builder property getter, referenced from the autovalue.vm template.static classInformation about a property setter, referenced from the autovalue.vm template. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeElementprivate static final com.google.common.collect.ImmutableSet<ElementKind> private final ErrorReporterprivate final ProcessingEnvironment -
Constructor Summary
ConstructorsConstructorDescriptionBuilderSpec(TypeElement autoValueClass, ProcessingEnvironment processingEnv, ErrorReporter errorReporter) -
Method Summary
Modifier and TypeMethodDescriptionprivate Set<ExecutableElement> abstractMethods(TypeElement typeElement) private Optional<BuilderSpec.Builder> builderFrom(TypeElement builderTypeElement) Returns a representation of the given@AutoValue.Builderclass or interface.(package private) Optional<BuilderSpec.Builder> Determines if the@AutoValueclass for this instance has a correct nested@AutoValue.Builderclass or interface and return a representation of it in anOptionalif so.private static booleanprivate String
-
Field Details
-
autoValueClass
-
processingEnv
-
errorReporter
-
CLASS_OR_INTERFACE
-
-
Constructor Details
-
BuilderSpec
BuilderSpec(TypeElement autoValueClass, ProcessingEnvironment processingEnv, ErrorReporter errorReporter)
-
-
Method Details
-
getBuilder
Optional<BuilderSpec.Builder> getBuilder()Determines if the@AutoValueclass for this instance has a correct nested@AutoValue.Builderclass or interface and return a representation of it in anOptionalif so. -
builderFrom
Returns a representation of the given@AutoValue.Builderclass 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
-
abstractMethods
-
typeParamsString
-