Class ImmutableValueImmutableInfo.Builder

java.lang.Object
org.immutables.value.processor.meta.ImmutableValueImmutableInfo.Builder
Enclosing class:
ImmutableValueImmutableInfo

@NotThreadSafe public static final class ImmutableValueImmutableInfo.Builder extends Object
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 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 provided org.immutables.value.processor.meta.ValueImmutableInfo instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided org.immutables.value.processor.meta.ValueMirrors.Immutable instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      private void from(short _unused, Object object)
    • isDefault

      public final ImmutableValueImmutableInfo.Builder isDefault(boolean isDefault)
      Initializes the value for the isDefault attribute.

      If not set, this attribute will have a default value as returned by the initializer of isDefault.

      Parameters:
      isDefault - The value for isDefault
      Returns:
      this builder for use in a chained invocation
    • builder

      public final ImmutableValueImmutableInfo.Builder builder(boolean builder)
      Initializes the value for the builder attribute.
      Parameters:
      builder - The value for builder
      Returns:
      this builder for use in a chained invocation
    • copy

      public final ImmutableValueImmutableInfo.Builder copy(boolean copy)
      Initializes the value for the copy attribute.
      Parameters:
      copy - The value for copy
      Returns:
      this builder for use in a chained invocation
    • intern

      public final ImmutableValueImmutableInfo.Builder intern(boolean intern)
      Initializes the value for the intern attribute.
      Parameters:
      intern - The value for intern
      Returns:
      this builder for use in a chained invocation
    • prehash

      public final ImmutableValueImmutableInfo.Builder prehash(boolean prehash)
      Initializes the value for the prehash attribute.
      Parameters:
      prehash - The value for prehash
      Returns:
      this builder for use in a chained invocation
    • lazyhash

      public final ImmutableValueImmutableInfo.Builder lazyhash(boolean lazyhash)
      Initializes the value for the lazyhash attribute.
      Parameters:
      lazyhash - The value for lazyhash
      Returns:
      this builder for use in a chained invocation
    • singleton

      public final ImmutableValueImmutableInfo.Builder singleton(boolean singleton)
      Initializes the value for the singleton attribute.
      Parameters:
      singleton - The value for singleton
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of ValueImmutableInfo
      Throws:
      IllegalStateException - if any required attributes are missing
    • isDefaultIsSet

      private boolean isDefaultIsSet()
    • formatRequiredAttributesMessage

      private String formatRequiredAttributesMessage()