Package org.immutables.value.processor
Class ImmutableOkTypeAdapterTypes.Builder
- java.lang.Object
-
- org.immutables.value.processor.ImmutableOkTypeAdapterTypes.Builder
-
- Enclosing class:
- ImmutableOkTypeAdapterTypes
@NotThreadSafe public static final class ImmutableOkTypeAdapterTypes.Builder extends java.lang.ObjectBuilds instances of typeImmutableOkTypeAdapterTypes. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Field Summary
Fields Modifier and Type Field Description private Proto.AbstractDeclaringdefinedByprivate static longINIT_BIT_DEFINED_BYprivate static longINIT_BIT_PACKAGE_GENERATEDprivate longinitBitsprivate java.lang.StringpackageGeneratedprivate com.google.common.collect.ImmutableList.Builder<ValueType>types
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableOkTypeAdapterTypes.BuilderaddAllTypes(java.lang.Iterable<? extends ValueType> elements)Adds elements totypeslist.ImmutableOkTypeAdapterTypes.BuilderaddTypes(ValueType element)Adds one element totypeslist.ImmutableOkTypeAdapterTypes.BuilderaddTypes(ValueType... elements)Adds elements totypeslist.ImmutableOkTypeAdapterTypesbuild()Builds a newImmutableOkTypeAdapterTypes.ImmutableOkTypeAdapterTypes.BuilderdefinedBy(Proto.AbstractDeclaring definedBy)Initializes the value for thedefinedByattribute.private java.lang.StringformatRequiredAttributesMessage()ImmutableOkTypeAdapterTypes.Builderfrom(OkJsons.OkTypeAdapterTypes instance)Fill a builder with attribute values from the providedOkTypeAdapterTypesinstance.ImmutableOkTypeAdapterTypes.BuilderpackageGenerated(java.lang.String packageGenerated)Initializes the value for thepackageGeneratedattribute.ImmutableOkTypeAdapterTypes.Buildertypes(java.lang.Iterable<? extends ValueType> elements)Sets or replaces all elements fortypeslist.
-
-
-
Field Detail
-
INIT_BIT_DEFINED_BY
private static final long INIT_BIT_DEFINED_BY
- See Also:
- Constant Field Values
-
INIT_BIT_PACKAGE_GENERATED
private static final long INIT_BIT_PACKAGE_GENERATED
- See Also:
- Constant Field Values
-
initBits
private long initBits
-
definedBy
@Nullable private Proto.AbstractDeclaring definedBy
-
packageGenerated
@Nullable private java.lang.String packageGenerated
-
types
private com.google.common.collect.ImmutableList.Builder<ValueType> types
-
-
Method Detail
-
from
public final ImmutableOkTypeAdapterTypes.Builder from(OkJsons.OkTypeAdapterTypes instance)
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
public final ImmutableOkTypeAdapterTypes.Builder definedBy(Proto.AbstractDeclaring definedBy)
Initializes the value for thedefinedByattribute.- Parameters:
definedBy- The value for definedBy- Returns:
thisbuilder for use in a chained invocation
-
packageGenerated
public final ImmutableOkTypeAdapterTypes.Builder packageGenerated(java.lang.String packageGenerated)
Initializes the value for thepackageGeneratedattribute.- Parameters:
packageGenerated- The value for packageGenerated- Returns:
thisbuilder for use in a chained invocation
-
addTypes
public final ImmutableOkTypeAdapterTypes.Builder addTypes(ValueType element)
Adds one element totypeslist.- Parameters:
element- A types element- Returns:
thisbuilder for use in a chained invocation
-
addTypes
public final ImmutableOkTypeAdapterTypes.Builder addTypes(ValueType... elements)
Adds elements totypeslist.- Parameters:
elements- An array of types elements- Returns:
thisbuilder for use in a chained invocation
-
types
public final ImmutableOkTypeAdapterTypes.Builder types(java.lang.Iterable<? extends ValueType> elements)
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(java.lang.Iterable<? extends ValueType> elements)
Adds elements totypeslist.- Parameters:
elements- An iterable of types elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableOkTypeAdapterTypes build()
Builds a newImmutableOkTypeAdapterTypes.- Returns:
- An immutable instance of OkTypeAdapterTypes
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
formatRequiredAttributesMessage
private java.lang.String formatRequiredAttributesMessage()
-
-