Class ImmutableTrees.LetStatement
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.LetStatement
- All Implemented Interfaces:
Trees.Block,Trees.InvokableStatement,Trees.LetStatement,Trees.Synthetic,Trees.TemplatePart
- Enclosing class:
ImmutableTrees
@Immutable
public static final class ImmutableTrees.LetStatement
extends Object
implements Trees.LetStatement
Immutable implementation of
Trees.LetStatement.
Use the builder to create immutable instances:
ImmutableTrees.LetStatement.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Trees.InvokableDeclarationprivate final com.google.common.collect.ImmutableList<Trees.TemplatePart> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLetStatement(com.google.common.collect.ImmutableList<Trees.TemplatePart> parts, Trees.InvokableDeclaration declaration) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forLetStatement.static ImmutableTrees.LetStatementcopyOf(Trees.LetStatement instance) Creates an immutable copy of aTrees.LetStatementvalue.booleanThis instance is equal to all instances ofLetStatementthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.LetStatement another) inthashCode()Computes a hash code from attributes:parts,declaration.com.google.common.collect.ImmutableList<Trees.TemplatePart> parts()toString()Prints the immutable valueLetStatementwith attribute values.Copy the current immutable object by setting a value for thedeclarationattribute.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
-
declaration
-
-
Constructor Details
-
LetStatement
private LetStatement(com.google.common.collect.ImmutableList<Trees.TemplatePart> parts, Trees.InvokableDeclaration declaration)
-
-
Method Details
-
parts
- Specified by:
partsin interfaceTrees.Block- Returns:
- The value of the
partsattribute
-
declaration
- Specified by:
declarationin interfaceTrees.InvokableStatement- Returns:
- The value of the
declarationattribute
-
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
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
-
withDeclaration
Copy the current immutable object by setting a value for thedeclarationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for declaration- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofLetStatementthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:parts,declaration. -
toString
Prints the immutable valueLetStatementwith attribute values. -
copyOf
Creates an immutable copy of aTrees.LetStatementvalue. 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 LetStatement instance
-
builder
Creates a builder forLetStatement.ImmutableTrees.LetStatement.builder() .addParts|addAllParts(org.immutables.generator.processor.Trees.TemplatePart) //partselements .declaration(org.immutables.generator.processor.Trees.InvokableDeclaration) // requireddeclaration.build();- Returns:
- A new LetStatement builder
-