Class ImmutableTrees.For.Builder
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.For.Builder
- Enclosing class:
ImmutableTrees.For
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.google.common.collect.ImmutableList.Builder<Trees.GeneratorDeclaration> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllDeclaration(Iterable<? extends Trees.GeneratorDeclaration> elements) Adds elements todeclarationlist.addDeclaration(Trees.GeneratorDeclaration element) Adds one element todeclarationlist.addDeclaration(Trees.GeneratorDeclaration... elements) Adds elements todeclarationlist.build()Builds a newFor.declaration(Iterable<? extends Trees.GeneratorDeclaration> elements) Sets or replaces all elements fordeclarationlist.Fill a builder with attribute values from the providedForinstance.
-
Field Details
-
declaration
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedForinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addDeclaration
Adds one element todeclarationlist.- Parameters:
element- A declaration element- Returns:
thisbuilder for use in a chained invocation
-
addDeclaration
Adds elements todeclarationlist.- Parameters:
elements- An array of declaration elements- Returns:
thisbuilder for use in a chained invocation
-
declaration
public final ImmutableTrees.For.Builder declaration(Iterable<? extends Trees.GeneratorDeclaration> elements) Sets or replaces all elements fordeclarationlist.- Parameters:
elements- An iterable of declaration elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDeclaration
public final ImmutableTrees.For.Builder addAllDeclaration(Iterable<? extends Trees.GeneratorDeclaration> elements) Adds elements todeclarationlist.- Parameters:
elements- An iterable of declaration elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newFor.- Returns:
- An immutable instance of For
- Throws:
IllegalStateException- if any required attributes are missing
-