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

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

  • Field Details

  • Constructor Details

  • Method Details

    • parts

      public com.google.common.collect.ImmutableList<Trees.TemplatePart> parts()
      Specified by:
      parts in interface Trees.Block
      Returns:
      The value of the parts attribute
    • access

      public Trees.Expression access()
      Specified by:
      access in interface Trees.InvokeStatement
      Returns:
      The value of the access attribute
    • params

      public com.google.common.collect.ImmutableList<Trees.Expression> params()
      Specified by:
      params in interface Trees.InvokeStatement
      Returns:
      The value of the params attribute
    • withParts

      public final ImmutableTrees.InvokeStatement withParts(Trees.TemplatePart... elements)
      Copy the current immutable object with elements that replace the content of parts.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withParts

      public final ImmutableTrees.InvokeStatement withParts(Iterable<? extends Trees.TemplatePart> elements)
      Copy the current immutable object with elements that replace the content of parts. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of parts elements to set
      Returns:
      A modified copy of this object
    • withAccess

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

      public final ImmutableTrees.InvokeStatement withParams(Trees.Expression... elements)
      Copy the current immutable object with elements that replace the content of params.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withParams

      public final ImmutableTrees.InvokeStatement withParams(Iterable<? extends Trees.Expression> elements)
      Copy the current immutable object with elements that replace the content of params. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of params elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of InvokeStatement 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.InvokeStatement another)
    • hashCode

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

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

      public static ImmutableTrees.InvokeStatement copyOf(Trees.InvokeStatement instance)
      Creates an immutable copy of a Trees.InvokeStatement 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 InvokeStatement instance
    • builder

      public static ImmutableTrees.InvokeStatement.Builder builder()
      Creates a builder for InvokeStatement.
       ImmutableTrees.InvokeStatement.builder()
          .addParts|addAllParts(org.immutables.generator.processor.Trees.TemplatePart) // parts elements
          .access(org.immutables.generator.processor.Trees.Expression) // required access
          .addParams|addAllParams(org.immutables.generator.processor.Trees.Expression) // params elements
          .build();
       
      Returns:
      A new InvokeStatement builder