Class ImmutableTrees.For.Builder
- java.lang.Object
-
- org.immutables.generator.processor.ImmutableTrees.For.Builder
-
- Enclosing class:
- ImmutableTrees.For
@NotThreadSafe public static final class ImmutableTrees.For.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableList.Builder<Trees.GeneratorDeclaration>declaration
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableTrees.For.BuilderaddAllDeclaration(java.lang.Iterable<? extends Trees.GeneratorDeclaration> elements)Adds elements todeclarationlist.ImmutableTrees.For.BuilderaddDeclaration(Trees.GeneratorDeclaration element)Adds one element todeclarationlist.ImmutableTrees.For.BuilderaddDeclaration(Trees.GeneratorDeclaration... elements)Adds elements todeclarationlist.ImmutableTrees.Forbuild()Builds a newFor.ImmutableTrees.For.Builderdeclaration(java.lang.Iterable<? extends Trees.GeneratorDeclaration> elements)Sets or replaces all elements fordeclarationlist.ImmutableTrees.For.Builderfrom(Trees.For instance)Fill a builder with attribute values from the providedForinstance.
-
-
-
Field Detail
-
declaration
private com.google.common.collect.ImmutableList.Builder<Trees.GeneratorDeclaration> declaration
-
-
Method Detail
-
from
public final ImmutableTrees.For.Builder from(Trees.For instance)
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
public final ImmutableTrees.For.Builder addDeclaration(Trees.GeneratorDeclaration element)
Adds one element todeclarationlist.- Parameters:
element- A declaration element- Returns:
thisbuilder for use in a chained invocation
-
addDeclaration
public final ImmutableTrees.For.Builder addDeclaration(Trees.GeneratorDeclaration... elements)
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(java.lang.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(java.lang.Iterable<? extends Trees.GeneratorDeclaration> elements)
Adds elements todeclarationlist.- Parameters:
elements- An iterable of declaration elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTrees.For build()
Builds a newFor.- Returns:
- An immutable instance of For
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-