Class ImmutableTrees.AssignGenerator
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.AssignGenerator
- All Implemented Interfaces:
Trees.AssignGenerator,Trees.GeneratorDeclaration,Trees.GeneratorValueDeclaration
- Enclosing class:
ImmutableTrees
@Immutable
public static final class ImmutableTrees.AssignGenerator
extends Object
implements Trees.AssignGenerator
Immutable implementation of
Trees.AssignGenerator.
Use the builder to create immutable instances:
ImmutableTrees.AssignGenerator.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Trees.ValueDeclarationprivate final Trees.Expression -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAssignGenerator(Trees.ValueDeclaration declaration, Trees.Expression from) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forAssignGenerator.copyOf(Trees.AssignGenerator instance) Creates an immutable copy of aTrees.AssignGeneratorvalue.booleanThis instance is equal to all instances ofAssignGeneratorthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.AssignGenerator another) from()inthashCode()Computes a hash code from attributes:declaration,from.toString()Prints the immutable valueAssignGeneratorwith attribute values.Copy the current immutable object by setting a value for thedeclarationattribute.withFrom(Trees.Expression value) Copy the current immutable object by setting a value for thefromattribute.
-
Field Details
-
declaration
-
from
-
-
Constructor Details
-
AssignGenerator
-
-
Method Details
-
declaration
- Specified by:
declarationin interfaceTrees.GeneratorValueDeclaration- Returns:
- The value of the
declarationattribute
-
from
- Specified by:
fromin interfaceTrees.GeneratorValueDeclaration- Returns:
- The value of the
fromattribute
-
withDeclaration
Copy the current immutable object by setting a value for thedeclarationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for declaration- Returns:
- A modified copy of the
thisobject
-
withFrom
Copy the current immutable object by setting a value for thefromattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for from- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofAssignGeneratorthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:declaration,from. -
toString
Prints the immutable valueAssignGeneratorwith attribute values. -
copyOf
Creates an immutable copy of aTrees.AssignGeneratorvalue. 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 AssignGenerator instance
-
builder
Creates a builder forAssignGenerator.ImmutableTrees.AssignGenerator.builder() .declaration(org.immutables.generator.processor.Trees.ValueDeclaration) // requireddeclaration.from(org.immutables.generator.processor.Trees.Expression) // requiredfrom.build();- Returns:
- A new AssignGenerator builder
-