Class ImmutableTrees.TypeDeclaration
java.lang.Object
org.immutables.generator.processor.Trees.TypeDeclaration
org.immutables.generator.processor.ImmutableTrees.TypeDeclaration
- All Implemented Interfaces:
Trees.TypeReference
- Enclosing class:
ImmutableTrees
Immutable implementation of
Trees.TypeDeclaration.
Use the builder to create immutable instances:
ImmutableTrees.TypeDeclaration.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.immutables.generator.processor.Trees.TypeDeclaration
Trees.TypeDeclaration.Kind -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Trees.TypeDeclaration.Kindprivate final Trees.TypeIdentifier -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateprivate -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forTypeDeclaration.copyOf(Trees.TypeDeclaration instance) Creates an immutable copy of aTrees.TypeDeclarationvalue.booleanThis instance is equal to all instances ofTypeDeclarationthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.TypeDeclaration another) inthashCode()Computes a hash code from attributes:type,kind.kind()toString()Prints the immutable valueTypeDeclarationwith attribute values.type()Copy the current immutable object by setting a value for thekindattribute.withType(Trees.TypeIdentifier value) Copy the current immutable object by setting a value for thetypeattribute.
-
Field Details
-
type
-
kind
-
-
Constructor Details
-
TypeDeclaration
-
TypeDeclaration
-
-
Method Details
-
type
- Specified by:
typein classTrees.TypeDeclaration- Returns:
- The value of the
typeattribute
-
kind
- Overrides:
kindin classTrees.TypeDeclaration- Returns:
- The value of the
kindattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withKind
Copy the current immutable object by setting a value for thekindattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for kind- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofTypeDeclarationthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:type,kind. -
toString
Prints the immutable valueTypeDeclarationwith attribute values. -
copyOf
Creates an immutable copy of aTrees.TypeDeclarationvalue. 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 TypeDeclaration instance
-
builder
Creates a builder forTypeDeclaration.ImmutableTrees.TypeDeclaration.builder() .type(org.immutables.generator.processor.Trees.TypeIdentifier) // requiredtype.kind(org.immutables.generator.processor.Trees.TypeDeclaration.Kind) // optionalkind.build();- Returns:
- A new TypeDeclaration builder
-