Top Description Fields Constructors
com.google.auto.value.processor

pack-priv abstract Class AutoValueOrBuilderTemplateVars

extends AutoValueishTemplateVars
Class Inheritance
Known Direct Subclasses
com.google.auto.value.processor.AutoValueTemplateVars, com.google.auto.value.processor.AutoBuilderTemplateVars
Annotations
@SuppressWarnings:unused
Imports
com.google.auto.value.processor.AutoValueishProcessor.Property, .PropertyBuilderClassifier.PropertyBuilder, com.google.common.collect.ImmutableList, .ImmutableMap, .ImmutableMultimap, .ImmutableSet, java.util.Optional

Variables to substitute into the autovalue.vm or builder.vm template.
Author
[email protected] (Éamonn McManus)

Field Summary

Modifier and TypeField and Description
pack-priv String
build

The constructor or method invocation that the build() method of a builder should use, without any parameters.

pack-priv String
builderActualTypes

The generic signature used by the generated builder subclass for its superclass reference.

pack-priv ImmutableList<String>
builderAnnotations

The full spelling of any annotations to add to the generated builder subclass, or an empty list if there are none.

pack-priv String
builderFormalTypes

The formal generic signature of the AutoValue.Builder class.

pack-priv ImmutableMap<String, BuilderSpec.PropertyGetter>
builderGetters

A map from property names to information about the associated property getter.

pack-priv Boolean
builderIsInterface

True if the builder being implemented is an interface, false if it is an abstract class.

pack-priv String
builderName

The simple name of the generated builder, or empty if there is no builder.

pack-priv ImmutableMap<String, PropertyBuilderClassifier.PropertyBuilder>
builderPropertyBuilders

A map from property names to information about the associated property builder.

pack-priv BuilderRequiredProperties
builderRequiredProperties

Properties that are required to be set.

pack-priv ImmutableMultimap<String, BuilderSpec.PropertySetter>
builderSetters

A multimap from property names (like foo) to the corresponding setters.

pack-priv String
builderTypeName

The name of the builder type as it should appear in source code, or empty if there is no builder type.

pack-priv Optional<SimpleMethod>
buildMethod

The builder's build method, often "build".

pack-priv String
builtType

The type that will be built by the build() method of a builder.

pack-priv Boolean
identifiers

Whether to include identifiers in strings in the generated code.

pack-priv Boolean
isFinal

True if the generated class should be final (there are no extensions that will generate subclasses)

pack-priv ImmutableSet<AutoValueishProcessor.Property>
props

The properties defined by the parent class's abstract methods.

pack-priv Boolean
toBuilderConstructor

True if the generated builder should have a second constructor with a parameter of the built type.

pack-priv ImmutableList<SimpleMethod>
toBuilderMethods

Any toBuilder() methods, that is methods that return the builder type.

Inherited from com.google.auto.value.processor.AutoValueishTemplateVars:
actualTypesannotationsequalsequalsParameterTypeformalTypesgeneratedhashCodeorigClasspkgserialVersionUIDsimpleClassNametoStringwildcardTypes

Constructor Summary

AccessConstructor and Description
pack-priv

Field Detail

buildback to summary
pack-priv String build

The constructor or method invocation that the build() method of a builder should use, without any parameters. This might be "new Foo" or "Foo.someMethod".

builderActualTypesback to summary
pack-priv String builderActualTypes

The generic signature used by the generated builder subclass for its superclass reference. This is empty, or contains only type variables with no bounds, for example <K, V>.

builderAnnotationsback to summary
pack-priv ImmutableList<String> builderAnnotations

The full spelling of any annotations to add to the generated builder subclass, or an empty list if there are none. A non-empty value might look something like @`java.lang.SuppressWarnings`("Immutable"). The `` marks are explained in TypeEncoder.

builderFormalTypesback to summary
pack-priv String builderFormalTypes

The formal generic signature of the AutoValue.Builder class. This is empty, or contains type variables with optional bounds, for example <K, V extends K>.

builderGettersback to summary
pack-priv ImmutableMap<String, BuilderSpec.PropertyGetter> builderGetters

A map from property names to information about the associated property getter. A property called foo (defined by a method foo() or getFoo()) can have a property getter method with the same name (foo() or getFoo()) and either the same return type or an Optional (or OptionalInt, etc) wrapping it.

builderIsInterfaceback to summary
pack-priv Boolean builderIsInterface

True if the builder being implemented is an interface, false if it is an abstract class.

builderNameback to summary
pack-priv String builderName

The simple name of the generated builder, or empty if there is no builder. This is just Builder for AutoValue, since it is nested inside the AutoValue_Foo class. But it is AutoBuilder_Foo for AutoBuilder.

builderPropertyBuildersback to summary
pack-priv ImmutableMap<String, PropertyBuilderClassifier.PropertyBuilder> builderPropertyBuilders

A map from property names to information about the associated property builder. A property called foo (defined by a method foo() or getFoo()) can have a property builder called fooBuilder(). The type of foo must be a type that has an associated builder following certain conventions. Guava immutable types such as ImmutableList follow those conventions, as do many @AutoValue types.

builderRequiredPropertiesback to summary
pack-priv BuilderRequiredProperties builderRequiredProperties

Properties that are required to be set. A property must be set explicitly except in the following cases:

  • it is @Nullable (in which case it defaults to null);
  • it has a builder initializer (for example it is Optional, which will have an initializer of Optional.empty());
  • it has a property-builder method (in which case it defaults to empty).
builderSettersback to summary
pack-priv ImmutableMultimap<String, BuilderSpec.PropertySetter> builderSetters

A multimap from property names (like foo) to the corresponding setters. The same property may be set by more than one setter. For example, an ImmutableList might be set by setFoo(ImmutableList<String>) and setFoo(String[]).

builderTypeNameback to summary
pack-priv String builderTypeName

The name of the builder type as it should appear in source code, or empty if there is no builder type. If class Address contains @AutoValue.Builder class Builder then this will typically be "Address.Builder".

buildMethodback to summary
pack-priv Optional<SimpleMethod> buildMethod

The builder's build method, often "build".

builtTypeback to summary
pack-priv String builtType

The type that will be built by the build() method of a builder.

identifiersback to summary
pack-priv Boolean identifiers

Whether to include identifiers in strings in the generated code. If false, exception messages will not mention properties by name, and toString() will include neither property names nor the name of the @AutoValue class.

isFinalback to summary
pack-priv Boolean isFinal

True if the generated class should be final (there are no extensions that will generate subclasses)

propsback to summary
pack-priv ImmutableSet<AutoValueishProcessor.Property> props

The properties defined by the parent class's abstract methods. The elements of this set are in the same order as the original abstract method declarations in the AutoValue class.

toBuilderConstructorback to summary
pack-priv Boolean toBuilderConstructor

True if the generated builder should have a second constructor with a parameter of the built type. The constructor produces a new builder that starts off with the values from the parameter.

toBuilderMethodsback to summary
pack-priv ImmutableList<SimpleMethod> toBuilderMethods

Any toBuilder() methods, that is methods that return the builder type. AutoBuilder does not support this, but it's included in these shared variables to simplify the template.

Constructor Detail

AutoValueOrBuilderTemplateVarsback to summary
pack-priv AutoValueOrBuilderTemplateVars()