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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInvokeString(ImmutableTrees.InvokeString original, Trees.StringLiteral literal) privateInvokeString(Trees.StringLiteral literal) -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTrees.InvokeStringcopyOf(Trees.InvokeString instance) Creates an immutable copy of aTrees.InvokeStringvalue.booleanThis instance is equal to all instances ofInvokeStringthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.InvokeString another) inthashCode()Computes a hash code from attributes:literal.literal()static ImmutableTrees.InvokeStringof(Trees.StringLiteral literal) Construct a new immutableInvokeStringinstance.toString()Prints the immutable valueInvokeStringwith attribute values.withLiteral(Trees.StringLiteral value) Copy the current immutable object by setting a value for theliteralattribute.
-
Field Details
-
literal
-
-
Constructor Details
-
InvokeString
-
InvokeString
-
-
Method Details
-
literal
- Specified by:
literalin interfaceTrees.InvokeString- Returns:
- The value of the
literalattribute
-
withLiteral
Copy the current immutable object by setting a value for theliteralattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for literal- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofInvokeStringthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:literal. -
toString
Prints the immutable valueInvokeStringwith attribute values. -
of
Construct a new immutableInvokeStringinstance.- Parameters:
literal- The value for theliteralattribute- Returns:
- An immutable InvokeString instance
-
copyOf
Creates an immutable copy of aTrees.InvokeStringvalue. 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
-