Class ImmutableTrees.Template.Builder
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.Template.Builder
- Enclosing class:
ImmutableTrees.Template
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Trees.InvokableDeclarationprivate static final longprivate longprivate booleanprivate static final longprivate longprivate com.google.common.collect.ImmutableList.Builder<Trees.TemplatePart> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllParts(Iterable<? extends Trees.TemplatePart> elements) Adds elements topartslist.addParts(Trees.TemplatePart element) Adds one element topartslist.addParts(Trees.TemplatePart... elements) Adds elements topartslist.build()Builds a newTemplate.declaration(Trees.InvokableDeclaration declaration) Initializes the value for thedeclarationattribute.private Stringprivate voidfrom(Trees.Block instance) Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.Blockinstance.from(Trees.InvokableStatement instance) Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.InvokableStatementinstance.from(Trees.Template instance) Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.Templateinstance.isPublic(boolean isPublic) Initializes the value for theisPublicattribute.private booleanparts(Iterable<? extends Trees.TemplatePart> elements) Sets or replaces all elements forpartslist.
-
Field Details
-
INIT_BIT_DECLARATION
private static final long INIT_BIT_DECLARATION- See Also:
-
OPT_BIT_IS_PUBLIC
private static final long OPT_BIT_IS_PUBLIC- See Also:
-
initBits
private long initBits -
optBits
private long optBits -
parts
-
declaration
-
isPublic
private boolean isPublic
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.Templateinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.InvokableStatementinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.Blockinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
-
addParts
Adds one element topartslist.- Parameters:
element- A parts element- Returns:
thisbuilder for use in a chained invocation
-
addParts
Adds elements topartslist.- Parameters:
elements- An array of parts elements- Returns:
thisbuilder for use in a chained invocation
-
parts
Sets or replaces all elements forpartslist.- Parameters:
elements- An iterable of parts elements- Returns:
thisbuilder for use in a chained invocation
-
addAllParts
public final ImmutableTrees.Template.Builder addAllParts(Iterable<? extends Trees.TemplatePart> elements) Adds elements topartslist.- Parameters:
elements- An iterable of parts elements- Returns:
thisbuilder for use in a chained invocation
-
declaration
Initializes the value for thedeclarationattribute.- Parameters:
declaration- The value for declaration- Returns:
thisbuilder for use in a chained invocation
-
isPublic
Initializes the value for theisPublicattribute.If not set, this attribute will have a default value as returned by the initializer of
isPublic.- Parameters:
isPublic- The value for isPublic- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newTemplate.- Returns:
- An immutable instance of Template
- Throws:
IllegalStateException- if any required attributes are missing
-
isPublicIsSet
private boolean isPublicIsSet() -
formatRequiredAttributesMessage
-