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 Object implements Trees.Let
Immutable implementation of Trees.Let.

Use the builder to create immutable instances: ImmutableTrees.Let.builder().

  • Field Details

  • Constructor Details

  • Method Details

    • declaration

      public Trees.InvokableDeclaration declaration()
      Specified by:
      declaration in interface Trees.InvokableStatement
      Returns:
      The value of the declaration attribute
    • withDeclaration

      public final ImmutableTrees.Let withDeclaration(Trees.InvokableDeclaration value)
      Copy the current immutable object by setting a value for the declaration attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for declaration
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Let that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableTrees.Let another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: declaration.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Let with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableTrees.Let copyOf(Trees.Let instance)
      Creates an immutable copy of a Trees.Let value. 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 for Let.
       ImmutableTrees.Let.builder()
          .declaration(org.immutables.generator.processor.Trees.InvokableDeclaration) // required declaration
          .build();
       
      Returns:
      A new Let builder