Package com.google.auto.value.processor
Class BuilderSpec.Builder
java.lang.Object
com.google.auto.value.processor.BuilderSpec.Builder
- Enclosing class:
BuilderSpec
Representation of an
AutoValue.Builder
class or interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeElement
private com.google.common.collect.ImmutableSet
<ExecutableElement> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
defineVars
(AutoValueTemplateVars vars, com.google.common.collect.ImmutableBiMap<ExecutableElement, String> getterToPropertyName) (package private) com.google.common.collect.ImmutableSet
<ExecutableElement> toBuilderMethods
(Types typeUtils, Set<ExecutableElement> abstractMethods) Finds any methods in the set that return the builder type.
-
Field Details
-
builderTypeElement
-
toBuilderMethods
-
-
Constructor Details
-
Builder
Builder(TypeElement builderTypeElement)
-
-
Method Details
-
toBuilderMethods
com.google.common.collect.ImmutableSet<ExecutableElement> toBuilderMethods(Types typeUtils, Set<ExecutableElement> abstractMethods) Finds any methods in the set that return the builder type. If the builder has type parameters<A, B>
, then the return type of the method must beBuilder<A, B>
with the same parameter names. We enforce elsewhere that the names and bounds of the builder parameters must be the same as those of the @AutoValue class. Here's a correct example:@AutoValue abstract class Foo<A extends Number, B> { abstract int someProperty(); abstract Builder<A, B> toBuilder(); interface Builder<A extends Number, B> {...} }
We currently impose that there cannot be more than one such method.
-
defineVars
void defineVars(AutoValueTemplateVars vars, com.google.common.collect.ImmutableBiMap<ExecutableElement, String> getterToPropertyName)
-