Package org.immutables.value.processor
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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTypeAdapterTypes. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Proto.AbstractDeclaringprivate final GsonMirrors.TypeAdaptersprivate final Stringprivate final com.google.common.collect.ImmutableList<ValueType> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableTypeAdapterTypes(Proto.AbstractDeclaring definedBy, String packageGenerated, com.google.common.collect.ImmutableList<ValueType> types, GsonMirrors.TypeAdapters mirror) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTypeAdapterTypes.static ImmutableTypeAdapterTypescopyOf(Gsons.TypeAdapterTypes instance) Creates an immutable copy of aGsons.TypeAdapterTypesvalue.booleanThis instance is equal to all instances ofImmutableTypeAdapterTypesthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTypeAdapterTypes another) inthashCode()Computes a hash code from attributes:definedBy,packageGenerated,types,mirror.mirror()toString()Prints the immutable valueTypeAdapterTypeswith attribute values.com.google.common.collect.ImmutableList<ValueType> types()Copy the current immutable object by setting a value for thedefinedByattribute.Copy the current immutable object by setting a value for themirrorattribute.withPackageGenerated(String value) Copy the current immutable object by setting a value for thepackageGeneratedattribute.Copy the current immutable object with elements that replace the content oftypes.Copy the current immutable object with elements that replace the content oftypes.
-
Field Details
-
definedBy
-
packageGenerated
-
types
-
mirror
-
-
Constructor Details
-
ImmutableTypeAdapterTypes
private ImmutableTypeAdapterTypes(Proto.AbstractDeclaring definedBy, String packageGenerated, com.google.common.collect.ImmutableList<ValueType> types, GsonMirrors.TypeAdapters mirror)
-
-
Method Details
-
definedBy
- Specified by:
definedByin interfaceGsons.TypeAdapterTypes- Returns:
- The value of the
definedByattribute
-
packageGenerated
- Specified by:
packageGeneratedin interfaceGsons.TypeAdapterTypes- Returns:
- The value of the
packageGeneratedattribute
-
types
- Specified by:
typesin interfaceGsons.TypeAdapterTypes- Returns:
- The value of the
typesattribute
-
mirror
- Specified by:
mirrorin interfaceGsons.TypeAdapterTypes- Returns:
- The value of the
mirrorattribute
-
withDefinedBy
Copy the current immutable object by setting a value for thedefinedByattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for definedBy- Returns:
- A modified copy of the
thisobject
-
withPackageGenerated
Copy the current immutable object by setting a value for thepackageGeneratedattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for packageGenerated- Returns:
- A modified copy of the
thisobject
-
withTypes
Copy the current immutable object with elements that replace the content oftypes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTypes
Copy the current immutable object with elements that replace the content oftypes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of types elements to set- Returns:
- A modified copy of
thisobject
-
withMirror
Copy the current immutable object by setting a value for themirrorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mirror- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableTypeAdapterTypesthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:definedBy,packageGenerated,types,mirror. -
toString
Prints the immutable valueTypeAdapterTypeswith attribute values. -
copyOf
Creates an immutable copy of aGsons.TypeAdapterTypesvalue. 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
Creates a builder forImmutableTypeAdapterTypes.ImmutableTypeAdapterTypes.builder() .definedBy(org.immutables.value.processor.meta.Proto.AbstractDeclaring) // requireddefinedBy.packageGenerated(String) // requiredpackageGenerated.addTypes|addAllTypes(org.immutables.value.processor.meta.ValueType) //typeselements .mirror(org.immutables.value.processor.meta.GsonMirrors.TypeAdapters) // requiredmirror.build();- Returns:
- A new ImmutableTypeAdapterTypes builder
-