Class ImmutableTypeAdapterTypes

java.lang.Object
org.immutables.value.processor.ImmutableTypeAdapterTypes
All Implemented Interfaces:
Gsons.TypeAdapterTypes

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableTypeAdapterTypes extends Object implements Gsons.TypeAdapterTypes
Immutable implementation of Gsons.TypeAdapterTypes.

Use the builder to create immutable instances: ImmutableTypeAdapterTypes.builder().

  • Field Details

  • Constructor Details

  • Method Details

    • definedBy

      public Proto.AbstractDeclaring definedBy()
      Specified by:
      definedBy in interface Gsons.TypeAdapterTypes
      Returns:
      The value of the definedBy attribute
    • packageGenerated

      public String packageGenerated()
      Specified by:
      packageGenerated in interface Gsons.TypeAdapterTypes
      Returns:
      The value of the packageGenerated attribute
    • types

      public com.google.common.collect.ImmutableList<ValueType> types()
      Specified by:
      types in interface Gsons.TypeAdapterTypes
      Returns:
      The value of the types attribute
    • mirror

      public GsonMirrors.TypeAdapters mirror()
      Specified by:
      mirror in interface Gsons.TypeAdapterTypes
      Returns:
      The value of the mirror attribute
    • withDefinedBy

      public final ImmutableTypeAdapterTypes withDefinedBy(Proto.AbstractDeclaring value)
      Copy the current immutable object by setting a value for the definedBy attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for definedBy
      Returns:
      A modified copy of the this object
    • withPackageGenerated

      public final ImmutableTypeAdapterTypes withPackageGenerated(String value)
      Copy the current immutable object by setting a value for the packageGenerated attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for packageGenerated
      Returns:
      A modified copy of the this object
    • withTypes

      public final ImmutableTypeAdapterTypes withTypes(ValueType... elements)
      Copy the current immutable object with elements that replace the content of types.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withTypes

      public final ImmutableTypeAdapterTypes withTypes(Iterable<? extends ValueType> elements)
      Copy the current immutable object with elements that replace the content of types. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of types elements to set
      Returns:
      A modified copy of this object
    • withMirror

      public final ImmutableTypeAdapterTypes withMirror(GsonMirrors.TypeAdapters value)
      Copy the current immutable object by setting a value for the mirror attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for mirror
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableTypeAdapterTypes 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, ImmutableTypeAdapterTypes another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: definedBy, packageGenerated, types, mirror.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value TypeAdapterTypes with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableTypeAdapterTypes copyOf(Gsons.TypeAdapterTypes instance)
      Creates an immutable copy of a Gsons.TypeAdapterTypes 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 TypeAdapterTypes instance
    • builder

      public static ImmutableTypeAdapterTypes.Builder builder()
      Creates a builder for ImmutableTypeAdapterTypes.
       ImmutableTypeAdapterTypes.builder()
          .definedBy(org.immutables.value.processor.meta.Proto.AbstractDeclaring) // required definedBy
          .packageGenerated(String) // required packageGenerated
          .addTypes|addAllTypes(org.immutables.value.processor.meta.ValueType) // types elements
          .mirror(org.immutables.value.processor.meta.GsonMirrors.TypeAdapters) // required mirror
          .build();
       
      Returns:
      A new ImmutableTypeAdapterTypes builder