Class ImmutableTrees.InvokableDeclaration.Builder
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.InvokableDeclaration.Builder
- Enclosing class:
ImmutableTrees.InvokableDeclaration
Builds instances of type
InvokableDeclaration.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate longprivate Trees.Identifierprivate com.google.common.collect.ImmutableList.Builder<Trees.Parameter> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllParameters(Iterable<? extends Trees.Parameter> elements) Adds elements toparameterslist.addParameters(Trees.Parameter element) Adds one element toparameterslist.addParameters(Trees.Parameter... elements) Adds elements toparameterslist.build()Builds a newInvokableDeclaration.private Stringprivate voidfrom(Trees.InvokableDeclaration instance) Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.InvokableDeclarationinstance.from(Trees.Named instance) Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.Namedinstance.name(Trees.Identifier name) Initializes the value for thenameattribute.parameters(Iterable<? extends Trees.Parameter> elements) Sets or replaces all elements forparameterslist.
-
Field Details
-
INIT_BIT_NAME
private static final long INIT_BIT_NAME- See Also:
-
initBits
private long initBits -
name
-
parameters
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.Namedinstance.- 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.InvokableDeclarationinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
addParameters
Adds one element toparameterslist.- Parameters:
element- A parameters element- Returns:
thisbuilder for use in a chained invocation
-
addParameters
Adds elements toparameterslist.- Parameters:
elements- An array of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
parameters
public final ImmutableTrees.InvokableDeclaration.Builder parameters(Iterable<? extends Trees.Parameter> elements) Sets or replaces all elements forparameterslist.- Parameters:
elements- An iterable of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllParameters
public final ImmutableTrees.InvokableDeclaration.Builder addAllParameters(Iterable<? extends Trees.Parameter> elements) Adds elements toparameterslist.- Parameters:
elements- An iterable of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newInvokableDeclaration.- Returns:
- An immutable instance of InvokableDeclaration
- Throws:
IllegalStateException- if any required attributes are missing
-
formatRequiredAttributesMessage
-