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 java.lang.Object implements Trees.InvokeString
Immutable implementation ofTrees.InvokeString.Use the static factory method to create immutable instances:
ImmutableTrees.InvokeString.of().
-
-
Field Summary
Fields Modifier and Type Field Description private Trees.StringLiteralliteral
-
Constructor Summary
Constructors Modifier Constructor Description privateInvokeString(ImmutableTrees.InvokeString original, Trees.StringLiteral literal)privateInvokeString(Trees.StringLiteral literal)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTrees.InvokeStringcopyOf(Trees.InvokeString instance)Creates an immutable copy of aTrees.InvokeStringvalue.booleanequals(java.lang.Object another)This 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.Trees.StringLiteralliteral()static ImmutableTrees.InvokeStringof(Trees.StringLiteral literal)Construct a new immutableInvokeStringinstance.java.lang.StringtoString()Prints the immutable valueInvokeStringwith attribute values.ImmutableTrees.InvokeStringwithLiteral(Trees.StringLiteral value)Copy the current immutable object by setting a value for theliteralattribute.
-
-
-
Field Detail
-
literal
private final Trees.StringLiteral literal
-
-
Constructor Detail
-
InvokeString
private InvokeString(Trees.StringLiteral literal)
-
InvokeString
private InvokeString(ImmutableTrees.InvokeString original, Trees.StringLiteral literal)
-
-
Method Detail
-
literal
public Trees.StringLiteral literal()
- Specified by:
literalin interfaceTrees.InvokeString- Returns:
- The value of the
literalattribute
-
withLiteral
public final ImmutableTrees.InvokeString withLiteral(Trees.StringLiteral value)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofInvokeStringthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableTrees.InvokeString another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:literal.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueInvokeStringwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static ImmutableTrees.InvokeString of(Trees.StringLiteral literal)
Construct a new immutableInvokeStringinstance.- Parameters:
literal- The value for theliteralattribute- Returns:
- An immutable InvokeString instance
-
copyOf
public static ImmutableTrees.InvokeString copyOf(Trees.InvokeString instance)
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
-
-