Class ImmutableTrees.StringLiteral
java.lang.Object
org.immutables.generator.processor.Trees.StringLiteral
org.immutables.generator.processor.ImmutableTrees.StringLiteral
- All Implemented Interfaces:
Trees.Expression
- Enclosing class:
ImmutableTrees
Immutable implementation of
Trees.StringLiteral.
Use the static factory method to create immutable instances:
ImmutableTrees.StringLiteral.of().
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateStringLiteral(String value) privateStringLiteral(ImmutableTrees.StringLiteral original, String value) -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTrees.StringLiteralcopyOf(Trees.StringLiteral instance) Creates an immutable copy of aTrees.StringLiteralvalue.booleanThis instance is equal to all instances ofStringLiteralthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.StringLiteral another) inthashCode()Computes a hash code from attributes:value.static ImmutableTrees.StringLiteralConstruct a new immutableStringLiteralinstance.value()Copy the current immutable object by setting a value for thevalueattribute.Methods inherited from class org.immutables.generator.processor.Trees.StringLiteral
toString
-
Field Details
-
value
-
-
Constructor Details
-
StringLiteral
-
StringLiteral
-
-
Method Details
-
value
- Specified by:
valuein classTrees.StringLiteral- Returns:
- The value of the
valueattribute
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofStringLiteralthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:value. -
of
Construct a new immutableStringLiteralinstance.- Parameters:
value- The value for thevalueattribute- Returns:
- An immutable StringLiteral instance
-
copyOf
Creates an immutable copy of aTrees.StringLiteralvalue. 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 StringLiteral instance
-