public class BuilderSpec.PropertyBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
builderType |
private java.lang.String |
copyAll |
private java.lang.String |
empty |
private java.lang.String |
initializer |
private java.lang.String |
name |
Constructor and Description |
---|
PropertyBuilder(javax.lang.model.element.ExecutableElement autoValuePropertyMethod,
javax.lang.model.element.ExecutableElement propertyBuilderMethod,
TypeSimplifier typeSimplifier) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBuilderType()
The type of the builder, for example
ImmutableSet.Builder<String> . |
java.lang.String |
getCopyAll()
The method to copy another collection into this builder.
|
java.lang.String |
getEmpty()
A method to return an empty collection of the type that this builder builds.
|
java.lang.String |
getInitializer()
An initializer for the builder field, for example
ImmutableSet.builder() . |
java.lang.String |
getName()
The name of the field to hold this builder.
|
private final java.lang.String name
private final java.lang.String builderType
private final java.lang.String initializer
private final java.lang.String copyAll
private final java.lang.String empty
PropertyBuilder(javax.lang.model.element.ExecutableElement autoValuePropertyMethod, javax.lang.model.element.ExecutableElement propertyBuilderMethod, TypeSimplifier typeSimplifier)
public java.lang.String getName()
public java.lang.String getBuilderType()
ImmutableSet.Builder<String>
.public java.lang.String getInitializer()
ImmutableSet.builder()
.public java.lang.String getEmpty()
ImmutableList<String>
then the method ImmutableList.of()
will
correctly return an empty ImmutableList<String>
, assuming the appropriate context for
type inference.public java.lang.String getCopyAll()
addAll
for
one-dimensional collections like ImmutableList
and ImmutableSet
, and it is
putAll
for two-dimensional collections like ImmutableMap
and
ImmutableTable
.