Class ImmutableTrees.Let
- java.lang.Object
-
- org.immutables.generator.processor.ImmutableTrees.Let
-
- All Implemented Interfaces:
Trees.Directive,Trees.DirectiveStart,Trees.InvokableStatement,Trees.Let,Trees.TemplatePart
- Enclosing class:
- ImmutableTrees
@Immutable public static final class ImmutableTrees.Let extends java.lang.Object implements Trees.Let
Immutable implementation ofTrees.Let.Use the builder to create immutable instances:
ImmutableTrees.Let.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTrees.Let.BuilderBuilds instances of typeLet.
-
Field Summary
Fields Modifier and Type Field Description private Trees.InvokableDeclarationdeclaration
-
Constructor Summary
Constructors Modifier Constructor Description privateLet(Trees.InvokableDeclaration declaration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTrees.Let.Builderbuilder()Creates a builder forLet.static ImmutableTrees.LetcopyOf(Trees.Let instance)Creates an immutable copy of aTrees.Letvalue.Trees.InvokableDeclarationdeclaration()booleanequals(java.lang.Object another)This instance is equal to all instances ofLetthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.Let another)inthashCode()Computes a hash code from attributes:declaration.java.lang.StringtoString()Prints the immutable valueLetwith attribute values.ImmutableTrees.LetwithDeclaration(Trees.InvokableDeclaration value)Copy the current immutable object by setting a value for thedeclarationattribute.
-
-
-
Field Detail
-
declaration
private final Trees.InvokableDeclaration declaration
-
-
Constructor Detail
-
Let
private Let(Trees.InvokableDeclaration declaration)
-
-
Method Detail
-
declaration
public Trees.InvokableDeclaration declaration()
- Specified by:
declarationin interfaceTrees.InvokableStatement- Returns:
- The value of the
declarationattribute
-
withDeclaration
public final ImmutableTrees.Let withDeclaration(Trees.InvokableDeclaration value)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofLetthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableTrees.Let another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:declaration.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueLetwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableTrees.Let copyOf(Trees.Let instance)
Creates an immutable copy of aTrees.Letvalue. 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 Let instance
-
builder
public static ImmutableTrees.Let.Builder builder()
Creates a builder forLet.ImmutableTrees.Let.builder() .declaration(org.immutables.generator.processor.Trees.InvokableDeclaration) // requireddeclaration.build();- Returns:
- A new Let builder
-
-