Class ImmutableTrees.ApplyExpression.Builder
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.ApplyExpression.Builder
- Enclosing class:
ImmutableTrees.ApplyExpression
Builds instances of type
ApplyExpression.
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 com.google.common.collect.ImmutableList.Builder<Trees.Expression> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllParams(Iterable<? extends Trees.Expression> elements) Adds elements toparamslist.addParams(Trees.Expression element) Adds one element toparamslist.addParams(Trees.Expression... elements) Adds elements toparamslist.build()Builds a newApplyExpression.from(Trees.ApplyExpression instance) Fill a builder with attribute values from the providedApplyExpressioninstance.params(Iterable<? extends Trees.Expression> elements) Sets or replaces all elements forparamslist.
-
Field Details
-
params
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedApplyExpressioninstance. 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
-
addParams
Adds one element toparamslist.- Parameters:
element- A params element- Returns:
thisbuilder for use in a chained invocation
-
addParams
Adds elements toparamslist.- Parameters:
elements- An array of params elements- Returns:
thisbuilder for use in a chained invocation
-
params
public final ImmutableTrees.ApplyExpression.Builder params(Iterable<? extends Trees.Expression> elements) Sets or replaces all elements forparamslist.- Parameters:
elements- An iterable of params elements- Returns:
thisbuilder for use in a chained invocation
-
addAllParams
public final ImmutableTrees.ApplyExpression.Builder addAllParams(Iterable<? extends Trees.Expression> elements) Adds elements toparamslist.- Parameters:
elements- An iterable of params elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newApplyExpression.- Returns:
- An immutable instance of ApplyExpression
- Throws:
IllegalStateException- if any required attributes are missing
-