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 implementation of
Trees.Let.
Use the builder to create immutable instances:
ImmutableTrees.Let.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTrees.Let.Builderbuilder()Creates a builder forLet.static ImmutableTrees.LetCreates an immutable copy of aTrees.Letvalue.booleanThis 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.toString()Prints the immutable valueLetwith attribute values.final ImmutableTrees.LetCopy the current immutable object by setting a value for thedeclarationattribute.
-
Field Details
-
declaration
-
-
Constructor Details
-
Let
-
-
Method Details
-
declaration
- Specified by:
declarationin interfaceTrees.InvokableStatement- Returns:
- The value of the
declarationattribute
-
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 ofLetthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:declaration. -
toString
Prints the immutable valueLetwith attribute values. -
copyOf
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
Creates a builder forLet.ImmutableTrees.Let.builder() .declaration(org.immutables.generator.processor.Trees.InvokableDeclaration) // requireddeclaration.build();- Returns:
- A new Let builder
-