Package org.immutables.value.processor
Class ImmutableOkTypeAdapterTypes.Builder
java.lang.Object
org.immutables.value.processor.ImmutableOkTypeAdapterTypes.Builder
- Enclosing class:
ImmutableOkTypeAdapterTypes
Builds instances of type
ImmutableOkTypeAdapterTypes.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Proto.AbstractDeclaringprivate static final longprivate static final longprivate longprivate Stringprivate com.google.common.collect.ImmutableList.Builder<ValueType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllTypes(Iterable<? extends ValueType> elements) Adds elements totypeslist.Adds one element totypeslist.Adds elements totypeslist.build()Builds a newImmutableOkTypeAdapterTypes.definedBy(Proto.AbstractDeclaring definedBy) Initializes the value for thedefinedByattribute.private Stringfrom(OkJsons.OkTypeAdapterTypes instance) Fill a builder with attribute values from the providedOkTypeAdapterTypesinstance.packageGenerated(String packageGenerated) Initializes the value for thepackageGeneratedattribute.Sets or replaces all elements fortypeslist.
-
Field Details
-
INIT_BIT_DEFINED_BY
private static final long INIT_BIT_DEFINED_BY- See Also:
-
INIT_BIT_PACKAGE_GENERATED
private static final long INIT_BIT_PACKAGE_GENERATED- See Also:
-
initBits
private long initBits -
definedBy
-
packageGenerated
-
types
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedOkTypeAdapterTypesinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
definedBy
Initializes the value for thedefinedByattribute.- Parameters:
definedBy- The value for definedBy- Returns:
thisbuilder for use in a chained invocation
-
packageGenerated
Initializes the value for thepackageGeneratedattribute.- Parameters:
packageGenerated- The value for packageGenerated- Returns:
thisbuilder for use in a chained invocation
-
addTypes
Adds one element totypeslist.- Parameters:
element- A types element- Returns:
thisbuilder for use in a chained invocation
-
addTypes
Adds elements totypeslist.- Parameters:
elements- An array of types elements- Returns:
thisbuilder for use in a chained invocation
-
types
Sets or replaces all elements fortypeslist.- Parameters:
elements- An iterable of types elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTypes
public final ImmutableOkTypeAdapterTypes.Builder addAllTypes(Iterable<? extends ValueType> elements) Adds elements totypeslist.- Parameters:
elements- An iterable of types elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableOkTypeAdapterTypes.- Returns:
- An immutable instance of OkTypeAdapterTypes
- Throws:
IllegalStateException- if any required attributes are missing
-
formatRequiredAttributesMessage
-