Class ImmutableValueImmutableInfo.Builder
- java.lang.Object
-
- org.immutables.value.processor.meta.ImmutableValueImmutableInfo.Builder
-
- Enclosing class:
- ImmutableValueImmutableInfo
@NotThreadSafe public static final class ImmutableValueImmutableInfo.Builder extends java.lang.ObjectBuilds instances of typeImmutableValueImmutableInfo. 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 booleanbuilderprivate booleancopyprivate static longINIT_BIT_BUILDERprivate static longINIT_BIT_COPYprivate static longINIT_BIT_INTERNprivate static longINIT_BIT_LAZYHASHprivate static longINIT_BIT_PREHASHprivate static longINIT_BIT_SINGLETONprivate longinitBitsprivate booleaninternprivate booleanisDefaultprivate booleanlazyhashprivate static longOPT_BIT_IS_DEFAULTprivate longoptBitsprivate booleanprehashprivate booleansingleton
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableValueImmutableInfobuild()Builds a newImmutableValueImmutableInfo.ImmutableValueImmutableInfo.Builderbuilder(boolean builder)Initializes the value for thebuilderattribute.ImmutableValueImmutableInfo.Buildercopy(boolean copy)Initializes the value for thecopyattribute.private java.lang.StringformatRequiredAttributesMessage()private voidfrom(short _unused, java.lang.Object object)ImmutableValueImmutableInfo.Builderfrom(ValueImmutableInfo instance)Fill a builder with attribute values from the providedorg.immutables.value.processor.meta.ValueImmutableInfoinstance.ImmutableValueImmutableInfo.Builderfrom(ValueMirrors.Immutable instance)Fill a builder with attribute values from the providedorg.immutables.value.processor.meta.ValueMirrors.Immutableinstance.ImmutableValueImmutableInfo.Builderintern(boolean intern)Initializes the value for theinternattribute.ImmutableValueImmutableInfo.BuilderisDefault(boolean isDefault)Initializes the value for theisDefaultattribute.private booleanisDefaultIsSet()ImmutableValueImmutableInfo.Builderlazyhash(boolean lazyhash)Initializes the value for thelazyhashattribute.ImmutableValueImmutableInfo.Builderprehash(boolean prehash)Initializes the value for theprehashattribute.ImmutableValueImmutableInfo.Buildersingleton(boolean singleton)Initializes the value for thesingletonattribute.
-
-
-
Field Detail
-
INIT_BIT_BUILDER
private static final long INIT_BIT_BUILDER
- See Also:
- Constant Field Values
-
INIT_BIT_COPY
private static final long INIT_BIT_COPY
- See Also:
- Constant Field Values
-
INIT_BIT_INTERN
private static final long INIT_BIT_INTERN
- See Also:
- Constant Field Values
-
INIT_BIT_PREHASH
private static final long INIT_BIT_PREHASH
- See Also:
- Constant Field Values
-
INIT_BIT_LAZYHASH
private static final long INIT_BIT_LAZYHASH
- See Also:
- Constant Field Values
-
INIT_BIT_SINGLETON
private static final long INIT_BIT_SINGLETON
- See Also:
- Constant Field Values
-
OPT_BIT_IS_DEFAULT
private static final long OPT_BIT_IS_DEFAULT
- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
from
public final ImmutableValueImmutableInfo.Builder from(ValueImmutableInfo instance)
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
public final ImmutableValueImmutableInfo.Builder from(ValueMirrors.Immutable instance)
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
private void from(short _unused, java.lang.Object object)
-
isDefault
public final ImmutableValueImmutableInfo.Builder isDefault(boolean 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
public final ImmutableValueImmutableInfo.Builder builder(boolean builder)
Initializes the value for thebuilderattribute.- Parameters:
builder- The value for builder- Returns:
thisbuilder for use in a chained invocation
-
copy
public final ImmutableValueImmutableInfo.Builder copy(boolean copy)
Initializes the value for thecopyattribute.- Parameters:
copy- The value for copy- Returns:
thisbuilder for use in a chained invocation
-
intern
public final ImmutableValueImmutableInfo.Builder intern(boolean intern)
Initializes the value for theinternattribute.- Parameters:
intern- The value for intern- Returns:
thisbuilder for use in a chained invocation
-
prehash
public final ImmutableValueImmutableInfo.Builder prehash(boolean prehash)
Initializes the value for theprehashattribute.- Parameters:
prehash- The value for prehash- Returns:
thisbuilder for use in a chained invocation
-
lazyhash
public final ImmutableValueImmutableInfo.Builder lazyhash(boolean lazyhash)
Initializes the value for thelazyhashattribute.- Parameters:
lazyhash- The value for lazyhash- Returns:
thisbuilder for use in a chained invocation
-
singleton
public final ImmutableValueImmutableInfo.Builder singleton(boolean singleton)
Initializes the value for thesingletonattribute.- Parameters:
singleton- The value for singleton- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableValueImmutableInfo build()
Builds a newImmutableValueImmutableInfo.- Returns:
- An immutable instance of ValueImmutableInfo
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
isDefaultIsSet
private boolean isDefaultIsSet()
-
formatRequiredAttributesMessage
private java.lang.String formatRequiredAttributesMessage()
-
-