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 of Trees.ResolvedType.

Use the builder to create immutable instances: ImmutableTrees.ResolvedType.builder(). Use the static factory method to create immutable instances: ImmutableTrees.ResolvedType.of().

  • Field Details

    • type

      private final Object type
  • Constructor Details

  • Method Details

    • type

      public Object type()
      Specified by:
      type in class Trees.ResolvedType
      Returns:
      The value of the type attribute
    • withType

      public final ImmutableTrees.ResolvedType withType(Object value)
      Copy the current immutable object by setting a value for the type attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ResolvedType that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableTrees.ResolvedType another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: type.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • of

      public static ImmutableTrees.ResolvedType of(Object type)
      Construct a new immutable ResolvedType instance.
      Parameters:
      type - The value for the type attribute
      Returns:
      An immutable ResolvedType instance
    • copyOf

      public static ImmutableTrees.ResolvedType copyOf(Trees.ResolvedType instance)
      Creates an immutable copy of a Trees.ResolvedType value. 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 for ResolvedType.
       ImmutableTrees.ResolvedType.builder()
          .type(Object) // required type
          .build();
       
      Returns:
      A new ResolvedType builder