@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","InstanceField"}) @Immutable public final class ImmutableInstanceField extends InstanceField
InstanceField.
Use the builder to create immutable instances:
ImmutableInstanceField.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableInstanceField.Builder
Builds instances of type
ImmutableInstanceField. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableInstanceField.Builder |
builder()
Creates a builder for
ImmutableInstanceField. |
com.squareup.javapoet.TypeName |
codecForClass() |
static ImmutableInstanceField |
copyOf(InstanceField instance)
Creates an immutable copy of a
InstanceField value. |
boolean |
customCodec() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableInstanceField that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
type, name, codecForClass, customCodec. |
String |
name() |
String |
toString()
Prints the immutable value
InstanceField with attribute values. |
com.squareup.javapoet.TypeName |
type() |
ImmutableInstanceField |
withCodecForClass(com.squareup.javapoet.TypeName codecForClass)
Copy the current immutable object by setting a value for the
codecForClass attribute. |
ImmutableInstanceField |
withCustomCodec(boolean customCodec)
Copy the current immutable object by setting a value for the
customCodec attribute. |
ImmutableInstanceField |
withName(String name)
Copy the current immutable object by setting a value for the
name attribute. |
ImmutableInstanceField |
withType(com.squareup.javapoet.TypeName type)
Copy the current immutable object by setting a value for the
type attribute. |
compareTo, isRegistry, isRegistryCodecpublic com.squareup.javapoet.TypeName type()
type in class InstanceFieldtype attributepublic String name()
name in class InstanceFieldname attribute@Nullable public com.squareup.javapoet.TypeName codecForClass()
codecForClass in class InstanceFieldcodecForClass attributepublic boolean customCodec()
customCodec in class InstanceFieldcustomCodec attributepublic final ImmutableInstanceField withType(com.squareup.javapoet.TypeName type)
type attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.type - A new value for typethis objectpublic final ImmutableInstanceField withName(String name)
name attribute.
An equals check used to prevent copying of the same value by returning this.name - A new value for namethis objectpublic final ImmutableInstanceField withCodecForClass(@Nullable com.squareup.javapoet.TypeName codecForClass)
codecForClass attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.codecForClass - A new value for codecForClass (can be null)this objectpublic final ImmutableInstanceField withCustomCodec(boolean customCodec)
customCodec attribute.
A value equality check is used to prevent copying of the same value by returning this.customCodec - A new value for customCodecthis objectpublic boolean equals(@Nullable Object another)
ImmutableInstanceField that have equal attribute values.public int hashCode()
type, name, codecForClass, customCodec.public String toString()
InstanceField with attribute values.public static ImmutableInstanceField copyOf(InstanceField instance)
InstanceField value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableInstanceField.Builder builder()
ImmutableInstanceField.Copyright © 2015–2016. All rights reserved.