| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | BuilderSpec.
Representation of an |
| pack-priv static class | BuilderSpec.
Specifies how to copy a parameter value into the target type. |
| public static class | BuilderSpec.
Information about a builder property getter, referenced from the autovalue.vm template. |
| public static class | BuilderSpec.
Information about a property setter, referenced from the autovalue.vm template. |
| Modifier and Type | Field and Description |
|---|---|
| private final javax. | |
| private static final ImmutableSet | |
| private final ErrorReporter | |
| private final javax. |
| Access | Constructor and Description |
|---|---|
| pack-priv | BuilderSpec(javax.
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ImmutableSet | abstractMethods(javax.
Returns a set of all abstract methods in the given TypeElement or inherited from ancestors. |
| private Optional | builderFrom(javax.
Returns a representation of the given |
| private Optional | findBuilderError(javax.
Finds why this |
| pack-priv Optional | getBuilder()
Determines if the |
| private static boolean | |
| pack-priv static boolean | sameTypeParameters(List<? extends javax.
|
| private String |
| autoValueClass | back to summary |
|---|---|
| private final javax. | |
| CLASS_OR_INTERFACE | back to summary |
|---|---|
| private static final ImmutableSet<javax. | |
| errorReporter | back to summary |
|---|---|
| private final ErrorReporter errorReporter | |
| processingEnv | back to summary |
|---|---|
| private final javax. | |
| BuilderSpec | back to summary |
|---|---|
| pack-priv BuilderSpec(javax. | |
| abstractMethods | back to summary |
|---|---|
| pack-priv static ImmutableSet Returns a set of all abstract methods in the given TypeElement or inherited from ancestors. If any of the abstract methods has a return type or parameter type that is not currently defined then this method will throw an exception that will cause us to defer processing of the current class until a later annotation-processing round. | |
| builderFrom | back to summary |
|---|---|
| private Optional Returns a representation of the given | |
| findBuilderError | back to summary |
|---|---|
| private Optional Finds why this | |
| getBuilder | back to summary |
|---|---|
| pack-priv Optional Determines if the | |
| sameTypeParameters | back to summary |
|---|---|
| private static boolean sameTypeParameters(javax. | |
| sameTypeParameters | back to summary |
|---|---|
| pack-priv static boolean sameTypeParameters(List<? extends javax. | |
| typeParamsString | back to summary |
|---|---|
| private String typeParamsString() | |
AutoValue.Builder class or interface.
| Modifier and Type | Field and Description |
|---|---|
| private final javax. | |
| private javax. | |
| private BuilderMethodClassifier | |
| private ImmutableSet |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public javax. | autoBuildMethod()
Implements com. Returns the abstract build method. |
| public Set | builderMethods()
Implements com. Returns static no-argument methods in the |
| public javax. | builderType()
Implements com. Returns the |
| public Optional | buildMethod()
Implements com. Returns the method |
| pack-priv void | |
| pack-priv void | defineVarsForAutoValue(AutoValueOrBuilderTemplateVars vars, ImmutableBiMap<javax.
|
| private boolean | |
| public Map | propertyBuilders()
Implements com. Returns a map from property names to property builders. |
| public Map | setters()
Implements com. Returns a map from property names to the corresponding setters. |
| public Set | toBuilderMethods()
Implements com. Returns abstract no-argument methods in the |
| pack-priv ImmutableSet | toBuilderMethods(javax.
Finds any methods in the set that return the builder type. |
| builderTypeElement | back to summary |
|---|---|
| private final javax. | |
| buildMethod | back to summary |
|---|---|
| private javax. | |
| classifier | back to summary |
|---|---|
| private BuilderMethodClassifier<?> classifier | |
| toBuilderMethods | back to summary |
|---|---|
| private ImmutableSet<javax. | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(javax. | |
| autoBuildMethod | back to summary |
|---|---|
| public javax. Implements com. Doc from com. Returns the abstract build method. If the Extensions should call the
| |
| builderMethods | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns static no-argument methods in the Consider a class like this:
Here
| |
| builderType | back to summary |
|---|---|
| public javax. Implements com. Doc from com. Returns the
| |
| buildMethod | back to summary |
|---|---|
| public Optional Implements com. Doc from com. Returns the method A common convention is for
| |
| defineVars | back to summary |
|---|---|
| pack-priv void defineVars(AutoValueOrBuilderTemplateVars vars, BuilderMethodClassifier<?> classifier) | |
| defineVarsForAutoValue | back to summary |
|---|---|
| pack-priv void defineVarsForAutoValue(AutoValueOrBuilderTemplateVars vars, ImmutableBiMap<javax. | |
| erasedTypeIs | back to summary |
|---|---|
| private boolean erasedTypeIs(javax. | |
| propertyBuilders | back to summary |
|---|---|
| public Map Implements com. Doc from com. Returns a map from property names to property builders. For example, if there is a property
| |
| setters | back to summary |
|---|---|
| public Map Implements com. Doc from com. Returns a map from property names to the corresponding setters. A property may have more than
one setter. For example, an
| |
| toBuilderMethods | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns abstract no-argument methods in the Consider a class like this:
Here
| |
| toBuilderMethods | back to summary |
|---|---|
| pack-priv ImmutableSet Finds any methods in the set that return the builder type. If the builder has type parameters
We currently impose that there cannot be more than one such method. | |
ImmutableList.of(...) or Optional.ofNullable(...).
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final Function | |
| pack-priv static final BuilderSpec. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static BuilderSpec. | |
| pack-priv static BuilderSpec. |
| acceptsNull | back to summary |
|---|---|
| private final boolean acceptsNull | |
| copy | back to summary |
|---|---|
| private final Function<String, String> copy | |
| IDENTITY | back to summary |
|---|---|
| pack-priv static final BuilderSpec. | |
| Copier | back to summary |
|---|---|
| private Copier(Function<String, String> copy, boolean acceptsNull) | |
| acceptingNull | back to summary |
|---|---|
| pack-priv static BuilderSpec. | |
| notAcceptingNull | back to summary |
|---|---|
| pack-priv static BuilderSpec. | |
T foo() or T getFoo()) can have a
getter method in the builder with the same name (foo() or getFoo()) and a
return type of either T or Optional<T>. The Optional<T> form can be
used to tell whether the property has been set. Here, Optional<T> can be either java.util.Optional or com.google.common.base.Optional. If T is int,
long, or double, then instead of Optional<T> we can have OptionalInt etc. If T is a primitive type (including these ones but also the other
five) then Optional<T> can be the corresponding boxed type.
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final String | |
| private final Optionalish | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | PropertyGetter(javax.
the source method which this getter is implementing. method,the type that the getter returns. This is written to take imports into account,
so it might be type, Optionalish List<String> for example. It is either identical to the type of
the corresponding getter in the @AutoValue class, or it is an optional wrapper,
like Optional<List<String>>.a representation of the optional)Optional type that the getter returns, if
this is an optional getter, or null otherwise. An optional getter is one that returns
Optional<T> rather than T, as explained above.Makes a new |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public Optionalish | |
| public String |
| access | back to summary |
|---|---|
| private final String access | |
| name | back to summary |
|---|---|
| private final String name | |
| optional | back to summary |
|---|---|
| private final Optionalish optional | |
| type | back to summary |
|---|---|
| private final String type | |
| PropertyGetter | back to summary |
|---|---|
| pack-priv PropertyGetter(javax. Makes a new
| |
| getAccess | back to summary |
|---|---|
| public String getAccess() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getOptional | back to summary |
|---|---|
| public Optionalish getOptional() | |
| getType | back to summary |
|---|---|
| public String getType() | |
T foo() or T getFoo()) can have a setter method
foo(T) or setFoo(T) that returns the builder type. Additionally, it can have a
setter with a type that can be copied to T through a copyOf method; for example
a property foo of type ImmutableSet<String> can be set with a method setFoo(Collection<String> foos). And, if T is Optional, it can have a setter
with a type that can be copied to T through Optional.of.
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final BuilderSpec. | |
| private final String | |
| private final String | |
| private final String | |
| private final boolean | |
| private final javax. |
| Access | Constructor and Description |
|---|---|
| pack-priv | PropertySetter(javax.
|
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public boolean | |
| pack-priv javax. | |
| private static String | parameterTypeString(javax.
|
| access | back to summary |
|---|---|
| private final String access | |
| copier | back to summary |
|---|---|
| private final BuilderSpec. | |
| name | back to summary |
|---|---|
| private final String name | |
| nullableAnnotation | back to summary |
|---|---|
| private final String nullableAnnotation | |
| parameterTypeString | back to summary |
|---|---|
| private final String parameterTypeString | |
| primitiveParameter | back to summary |
|---|---|
| private final boolean primitiveParameter | |
| setter | back to summary |
|---|---|
| private final javax. | |
| PropertySetter | back to summary |
|---|---|
| pack-priv PropertySetter(javax. | |
| copy | back to summary |
|---|---|
| public String copy(AutoValueishProcessor. | |
| getAccess | back to summary |
|---|---|
| public String getAccess() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getNullableAnnotation | back to summary |
|---|---|
| public String getNullableAnnotation() | |
| getParameterType | back to summary |
|---|---|
| public String getParameterType() | |
| getPrimitiveParameter | back to summary |
|---|---|
| public boolean getPrimitiveParameter() | |
| getSetter | back to summary |
|---|---|
| pack-priv javax. | |
| parameterTypeString | back to summary |
|---|---|
| private static String parameterTypeString(javax. | |