Class ImmutableTrees.InvokeString

java.lang.Object
org.immutables.generator.processor.ImmutableTrees.InvokeString
All Implemented Interfaces:
Trees.Directive, Trees.DirectiveStart, Trees.InvokeString, Trees.TemplatePart
Enclosing class:
ImmutableTrees

@Immutable public static final class ImmutableTrees.InvokeString extends Object implements Trees.InvokeString
Immutable implementation of Trees.InvokeString.

Use the static factory method to create immutable instances: ImmutableTrees.InvokeString.of().

  • Field Details

  • Constructor Details

  • Method Details

    • literal

      public Trees.StringLiteral literal()
      Specified by:
      literal in interface Trees.InvokeString
      Returns:
      The value of the literal attribute
    • withLiteral

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

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

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

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

      Construct a new immutable InvokeString instance.
      Parameters:
      literal - The value for the literal attribute
      Returns:
      An immutable InvokeString instance
    • copyOf

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