Class ImmutableTrees.InvokeStatement
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.InvokeStatement
- All Implemented Interfaces:
Trees.Block,Trees.InvokeStatement,Trees.Synthetic,Trees.TemplatePart
- Enclosing class:
ImmutableTrees
@Immutable
public static final class ImmutableTrees.InvokeStatement
extends Object
implements Trees.InvokeStatement
Immutable implementation of
Trees.InvokeStatement.
Use the builder to create immutable instances:
ImmutableTrees.InvokeStatement.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Trees.Expressionprivate final com.google.common.collect.ImmutableList<Trees.Expression> private final com.google.common.collect.ImmutableList<Trees.TemplatePart> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInvokeStatement(com.google.common.collect.ImmutableList<Trees.TemplatePart> parts, Trees.Expression access, com.google.common.collect.ImmutableList<Trees.Expression> params) -
Method Summary
Modifier and TypeMethodDescriptionaccess()builder()Creates a builder forInvokeStatement.copyOf(Trees.InvokeStatement instance) Creates an immutable copy of aTrees.InvokeStatementvalue.booleanThis instance is equal to all instances ofInvokeStatementthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.InvokeStatement another) inthashCode()Computes a hash code from attributes:parts,access,params.com.google.common.collect.ImmutableList<Trees.Expression> params()com.google.common.collect.ImmutableList<Trees.TemplatePart> parts()toString()Prints the immutable valueInvokeStatementwith attribute values.withAccess(Trees.Expression value) Copy the current immutable object by setting a value for theaccessattribute.withParams(Iterable<? extends Trees.Expression> elements) Copy the current immutable object with elements that replace the content ofparams.withParams(Trees.Expression... elements) Copy the current immutable object with elements that replace the content ofparams.withParts(Iterable<? extends Trees.TemplatePart> elements) Copy the current immutable object with elements that replace the content ofparts.withParts(Trees.TemplatePart... elements) Copy the current immutable object with elements that replace the content ofparts.
-
Field Details
-
parts
-
access
-
params
-
-
Constructor Details
-
InvokeStatement
private InvokeStatement(com.google.common.collect.ImmutableList<Trees.TemplatePart> parts, Trees.Expression access, com.google.common.collect.ImmutableList<Trees.Expression> params)
-
-
Method Details
-
parts
- Specified by:
partsin interfaceTrees.Block- Returns:
- The value of the
partsattribute
-
access
- Specified by:
accessin interfaceTrees.InvokeStatement- Returns:
- The value of the
accessattribute
-
params
- Specified by:
paramsin interfaceTrees.InvokeStatement- Returns:
- The value of the
paramsattribute
-
withParts
Copy the current immutable object with elements that replace the content ofparts.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withParts
public final ImmutableTrees.InvokeStatement withParts(Iterable<? extends Trees.TemplatePart> elements) Copy the current immutable object with elements that replace the content ofparts. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of parts elements to set- Returns:
- A modified copy of
thisobject
-
withAccess
Copy the current immutable object by setting a value for theaccessattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for access- Returns:
- A modified copy of the
thisobject
-
withParams
Copy the current immutable object with elements that replace the content ofparams.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withParams
public final ImmutableTrees.InvokeStatement withParams(Iterable<? extends Trees.Expression> elements) Copy the current immutable object with elements that replace the content ofparams. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of params elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofInvokeStatementthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:parts,access,params. -
toString
Prints the immutable valueInvokeStatementwith attribute values. -
copyOf
Creates an immutable copy of aTrees.InvokeStatementvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable InvokeStatement instance
-
builder
Creates a builder forInvokeStatement.ImmutableTrees.InvokeStatement.builder() .addParts|addAllParts(org.immutables.generator.processor.Trees.TemplatePart) //partselements .access(org.immutables.generator.processor.Trees.Expression) // requiredaccess.addParams|addAllParams(org.immutables.generator.processor.Trees.Expression) //paramselements .build();- Returns:
- A new InvokeStatement builder
-