Class ImmutableConstitution.NameForms

Enclosing class:
ImmutableConstitution

@Immutable public static final class ImmutableConstitution.NameForms extends Constitution.NameForms
Immutable implementation of Constitution.NameForms.

Use the builder to create immutable instances: ImmutableConstitution.NameForms.builder().

  • Field Details

    • simple

      private final String simple
    • relativeRaw

      private final String relativeRaw
    • packageOf

      private final String packageOf
    • visibility

      private final Visibility visibility
    • absolute

      private final String absolute
    • absoluteRaw

      private final String absoluteRaw
    • genericArgs

      private final String genericArgs
    • relativeAlreadyQualified

      private final boolean relativeAlreadyQualified
    • STAGE_INITIALIZING

      private static final byte STAGE_INITIALIZING
      See Also:
    • STAGE_UNINITIALIZED

      private static final byte STAGE_UNINITIALIZED
      See Also:
    • STAGE_INITIALIZED

      private static final byte STAGE_INITIALIZED
      See Also:
    • initShim

      private transient volatile ImmutableConstitution.NameForms.InitShim initShim
  • Constructor Details

  • Method Details

    • simple

      public String simple()
      Specified by:
      simple in class Constitution.AbstractNameForms
      Returns:
      The value of the simple attribute
    • relativeRaw

      public String relativeRaw()
      Specified by:
      relativeRaw in class Constitution.AbstractNameForms
      Returns:
      The value of the relativeRaw attribute
    • packageOf

      public String packageOf()
      Specified by:
      packageOf in class Constitution.AbstractNameForms
      Returns:
      The value of the packageOf attribute
    • visibility

      public Visibility visibility()
      Specified by:
      visibility in class Constitution.AbstractNameForms
      Returns:
      The value of the visibility attribute
    • absolute

      public String absolute()
      Overrides:
      absolute in class Constitution.AbstractNameForms
      Returns:
      The value of the absolute attribute
    • absoluteRaw

      public String absoluteRaw()
      Overrides:
      absoluteRaw in class Constitution.AbstractNameForms
      Returns:
      The value of the absoluteRaw attribute
    • genericArgs

      public String genericArgs()
      Overrides:
      genericArgs in class Constitution.AbstractNameForms
      Returns:
      The value of the genericArgs attribute
    • relativeAlreadyQualified

      public boolean relativeAlreadyQualified()
      Overrides:
      relativeAlreadyQualified in class Constitution.AbstractNameForms
      Returns:
      The value of the relativeAlreadyQualified attribute
    • withSimple

      public final ImmutableConstitution.NameForms withSimple(String value)
      Copy the current immutable object by setting a value for the simple attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for simple
      Returns:
      A modified copy of the this object
    • withRelativeRaw

      public final ImmutableConstitution.NameForms withRelativeRaw(String value)
      Copy the current immutable object by setting a value for the relativeRaw attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for relativeRaw
      Returns:
      A modified copy of the this object
    • withPackageOf

      public final ImmutableConstitution.NameForms withPackageOf(String value)
      Copy the current immutable object by setting a value for the packageOf attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for packageOf
      Returns:
      A modified copy of the this object
    • withVisibility

      public final ImmutableConstitution.NameForms withVisibility(Visibility value)
      Copy the current immutable object by setting a value for the visibility attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for visibility
      Returns:
      A modified copy of the this object
    • withAbsolute

      public final ImmutableConstitution.NameForms withAbsolute(String value)
      Copy the current immutable object by setting a value for the absolute attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for absolute
      Returns:
      A modified copy of the this object
    • withAbsoluteRaw

      public final ImmutableConstitution.NameForms withAbsoluteRaw(String value)
      Copy the current immutable object by setting a value for the absoluteRaw attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for absoluteRaw
      Returns:
      A modified copy of the this object
    • withGenericArgs

      public final ImmutableConstitution.NameForms withGenericArgs(String value)
      Copy the current immutable object by setting a value for the genericArgs attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for genericArgs
      Returns:
      A modified copy of the this object
    • withRelativeAlreadyQualified

      public final ImmutableConstitution.NameForms withRelativeAlreadyQualified(boolean value)
      Copy the current immutable object by setting a value for the relativeAlreadyQualified attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for relativeAlreadyQualified
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of NameForms that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableConstitution.NameForms another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: simple, relativeRaw, packageOf, visibility, absolute, absoluteRaw, genericArgs, relativeAlreadyQualified.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • copyOf

      Creates an immutable copy of a Constitution.NameForms value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable NameForms instance
    • builder

      public static ImmutableConstitution.NameForms.Builder builder()
      Creates a builder for NameForms.
       ImmutableConstitution.NameForms.builder()
          .simple(String) // required simple
          .relativeRaw(String) // required relativeRaw
          .packageOf(String) // required packageOf
          .visibility(org.immutables.value.processor.meta.Visibility) // required visibility
          .absolute(String) // optional absolute
          .absoluteRaw(String) // optional absoluteRaw
          .genericArgs(String) // optional genericArgs
          .relativeAlreadyQualified(boolean) // optional relativeAlreadyQualified
          .build();
       
      Returns:
      A new NameForms builder