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 java.lang.Object implements Trees.InvokeStatement
Immutable implementation ofTrees.InvokeStatement.Use the builder to create immutable instances:
ImmutableTrees.InvokeStatement.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTrees.InvokeStatement.BuilderBuilds instances of typeInvokeStatement.
-
Field Summary
Fields Modifier and Type Field Description private Trees.Expressionaccessprivate com.google.common.collect.ImmutableList<Trees.Expression>paramsprivate com.google.common.collect.ImmutableList<Trees.TemplatePart>parts
-
Constructor Summary
Constructors Modifier Constructor Description privateInvokeStatement(com.google.common.collect.ImmutableList<Trees.TemplatePart> parts, Trees.Expression access, com.google.common.collect.ImmutableList<Trees.Expression> params)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Trees.Expressionaccess()static ImmutableTrees.InvokeStatement.Builderbuilder()Creates a builder forInvokeStatement.static ImmutableTrees.InvokeStatementcopyOf(Trees.InvokeStatement instance)Creates an immutable copy of aTrees.InvokeStatementvalue.booleanequals(java.lang.Object another)This 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()java.lang.StringtoString()Prints the immutable valueInvokeStatementwith attribute values.ImmutableTrees.InvokeStatementwithAccess(Trees.Expression value)Copy the current immutable object by setting a value for theaccessattribute.ImmutableTrees.InvokeStatementwithParams(java.lang.Iterable<? extends Trees.Expression> elements)Copy the current immutable object with elements that replace the content ofparams.ImmutableTrees.InvokeStatementwithParams(Trees.Expression... elements)Copy the current immutable object with elements that replace the content ofparams.ImmutableTrees.InvokeStatementwithParts(java.lang.Iterable<? extends Trees.TemplatePart> elements)Copy the current immutable object with elements that replace the content ofparts.ImmutableTrees.InvokeStatementwithParts(Trees.TemplatePart... elements)Copy the current immutable object with elements that replace the content ofparts.
-
-
-
Field Detail
-
parts
private final com.google.common.collect.ImmutableList<Trees.TemplatePart> parts
-
access
private final Trees.Expression access
-
params
private final com.google.common.collect.ImmutableList<Trees.Expression> params
-
-
Constructor Detail
-
InvokeStatement
private InvokeStatement(com.google.common.collect.ImmutableList<Trees.TemplatePart> parts, Trees.Expression access, com.google.common.collect.ImmutableList<Trees.Expression> params)
-
-
Method Detail
-
parts
public com.google.common.collect.ImmutableList<Trees.TemplatePart> parts()
- Specified by:
partsin interfaceTrees.Block- Returns:
- The value of the
partsattribute
-
access
public Trees.Expression access()
- Specified by:
accessin interfaceTrees.InvokeStatement- Returns:
- The value of the
accessattribute
-
params
public com.google.common.collect.ImmutableList<Trees.Expression> params()
- Specified by:
paramsin interfaceTrees.InvokeStatement- Returns:
- The value of the
paramsattribute
-
withParts
public final ImmutableTrees.InvokeStatement withParts(Trees.TemplatePart... elements)
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(java.lang.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
public final ImmutableTrees.InvokeStatement withAccess(Trees.Expression value)
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
public final ImmutableTrees.InvokeStatement withParams(Trees.Expression... elements)
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(java.lang.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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofInvokeStatementthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableTrees.InvokeStatement another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:parts,access,params.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueInvokeStatementwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableTrees.InvokeStatement copyOf(Trees.InvokeStatement instance)
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
public static ImmutableTrees.InvokeStatement.Builder 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
-
-