Class ImmutableValueImmutableInfo.Builder
java.lang.Object
org.immutables.value.processor.meta.ImmutableValueImmutableInfo.Builder
- Enclosing class:
ImmutableValueImmutableInfo
Builds instances of type
ImmutableValueImmutableInfo.
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 booleanprivate booleanprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate longprivate booleanprivate booleanprivate booleanprivate static final longprivate longprivate booleanprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableValueImmutableInfo.builder(boolean builder) Initializes the value for thebuilderattribute.copy(boolean copy) Initializes the value for thecopyattribute.private Stringprivate voidfrom(ValueImmutableInfo instance) Fill a builder with attribute values from the providedorg.immutables.value.processor.meta.ValueImmutableInfoinstance.from(ValueMirrors.Immutable instance) Fill a builder with attribute values from the providedorg.immutables.value.processor.meta.ValueMirrors.Immutableinstance.intern(boolean intern) Initializes the value for theinternattribute.isDefault(boolean isDefault) Initializes the value for theisDefaultattribute.private booleanlazyhash(boolean lazyhash) Initializes the value for thelazyhashattribute.prehash(boolean prehash) Initializes the value for theprehashattribute.singleton(boolean singleton) Initializes the value for thesingletonattribute.
-
Field Details
-
INIT_BIT_BUILDER
private static final long INIT_BIT_BUILDER- See Also:
-
INIT_BIT_COPY
private static final long INIT_BIT_COPY- See Also:
-
INIT_BIT_INTERN
private static final long INIT_BIT_INTERN- See Also:
-
INIT_BIT_PREHASH
private static final long INIT_BIT_PREHASH- See Also:
-
INIT_BIT_LAZYHASH
private static final long INIT_BIT_LAZYHASH- See Also:
-
INIT_BIT_SINGLETON
private static final long INIT_BIT_SINGLETON- See Also:
-
OPT_BIT_IS_DEFAULT
private static final long OPT_BIT_IS_DEFAULT- See Also:
-
initBits
private long initBits -
optBits
private long optBits -
isDefault
private boolean isDefault -
builder
private boolean builder -
copy
private boolean copy -
intern
private boolean intern -
prehash
private boolean prehash -
lazyhash
private boolean lazyhash -
singleton
private boolean singleton
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.immutables.value.processor.meta.ValueImmutableInfoinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedorg.immutables.value.processor.meta.ValueMirrors.Immutableinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
-
isDefault
Initializes the value for theisDefaultattribute.If not set, this attribute will have a default value as returned by the initializer of
isDefault.- Parameters:
isDefault- The value for isDefault- Returns:
thisbuilder for use in a chained invocation
-
builder
Initializes the value for thebuilderattribute.- Parameters:
builder- The value for builder- Returns:
thisbuilder for use in a chained invocation
-
copy
Initializes the value for thecopyattribute.- Parameters:
copy- The value for copy- Returns:
thisbuilder for use in a chained invocation
-
intern
Initializes the value for theinternattribute.- Parameters:
intern- The value for intern- Returns:
thisbuilder for use in a chained invocation
-
prehash
Initializes the value for theprehashattribute.- Parameters:
prehash- The value for prehash- Returns:
thisbuilder for use in a chained invocation
-
lazyhash
Initializes the value for thelazyhashattribute.- Parameters:
lazyhash- The value for lazyhash- Returns:
thisbuilder for use in a chained invocation
-
singleton
Initializes the value for thesingletonattribute.- Parameters:
singleton- The value for singleton- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableValueImmutableInfo.- Returns:
- An immutable instance of ValueImmutableInfo
- Throws:
IllegalStateException- if any required attributes are missing
-
isDefaultIsSet
private boolean isDefaultIsSet() -
formatRequiredAttributesMessage
-