Class ImmutableTrees.ResolvedType
- java.lang.Object
-
- org.immutables.generator.processor.Trees.ResolvedType
-
- org.immutables.generator.processor.ImmutableTrees.ResolvedType
-
- All Implemented Interfaces:
Trees.Synthetic,Trees.TypeReference
- Enclosing class:
- ImmutableTrees
@Immutable public static final class ImmutableTrees.ResolvedType extends Trees.ResolvedType
Immutable implementation ofTrees.ResolvedType.Use the builder to create immutable instances:
ImmutableTrees.ResolvedType.builder(). Use the static factory method to create immutable instances:ImmutableTrees.ResolvedType.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTrees.ResolvedType.BuilderBuilds instances of typeResolvedType.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Objecttype
-
Constructor Summary
Constructors Modifier Constructor Description privateResolvedType(java.lang.Object type)privateResolvedType(ImmutableTrees.ResolvedType original, java.lang.Object type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTrees.ResolvedType.Builderbuilder()Creates a builder forResolvedType.static ImmutableTrees.ResolvedTypecopyOf(Trees.ResolvedType instance)Creates an immutable copy of aTrees.ResolvedTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofResolvedTypethat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.ResolvedType another)inthashCode()Computes a hash code from attributes:type.static ImmutableTrees.ResolvedTypeof(java.lang.Object type)Construct a new immutableResolvedTypeinstance.java.lang.Objecttype()ImmutableTrees.ResolvedTypewithType(java.lang.Object value)Copy the current immutable object by setting a value for thetypeattribute.-
Methods inherited from class org.immutables.generator.processor.Trees.ResolvedType
toString
-
-
-
-
Constructor Detail
-
ResolvedType
private ResolvedType(java.lang.Object type)
-
ResolvedType
private ResolvedType(ImmutableTrees.ResolvedType original, java.lang.Object type)
-
-
Method Detail
-
type
public java.lang.Object type()
- Specified by:
typein classTrees.ResolvedType- Returns:
- The value of the
typeattribute
-
withType
public final ImmutableTrees.ResolvedType withType(java.lang.Object value)
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
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofResolvedTypethat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableTrees.ResolvedType another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:type.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
of
public static ImmutableTrees.ResolvedType of(java.lang.Object type)
Construct a new immutableResolvedTypeinstance.- Parameters:
type- The value for thetypeattribute- Returns:
- An immutable ResolvedType instance
-
copyOf
public static ImmutableTrees.ResolvedType copyOf(Trees.ResolvedType instance)
Creates an immutable copy of aTrees.ResolvedTypevalue. 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 ResolvedType instance
-
builder
public static ImmutableTrees.ResolvedType.Builder builder()
Creates a builder forResolvedType.ImmutableTrees.ResolvedType.builder() .type(Object) // requiredtype.build();- Returns:
- A new ResolvedType builder
-
-