Class ImmutableNullabilityAnnotationInfo

java.lang.Object
org.immutables.value.processor.meta.NullabilityAnnotationInfo
org.immutables.value.processor.meta.ImmutableNullabilityAnnotationInfo

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable final class ImmutableNullabilityAnnotationInfo extends NullabilityAnnotationInfo
Immutable implementation of NullabilityAnnotationInfo.

Use the static factory method to create immutable instances: ImmutableNullabilityAnnotationInfo.of().

  • Field Details

    • element

      private final TypeElement element
    • qualifiedName

      private final transient String qualifiedName
    • simpleName

      private final transient String simpleName
    • 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 ImmutableNullabilityAnnotationInfo.InitShim initShim
    • lazyInitBitmap

      private transient volatile long lazyInitBitmap
    • AS_PREFIX_LAZY_INIT_BIT

      private static final long AS_PREFIX_LAZY_INIT_BIT
      See Also:
    • asPrefix

      private transient String asPrefix
    • AS_LOCAL_PREFIX_LAZY_INIT_BIT

      private static final long AS_LOCAL_PREFIX_LAZY_INIT_BIT
      See Also:
    • asLocalPrefix

      private transient String asLocalPrefix
  • Constructor Details

  • Method Details

    • element

      TypeElement element()
      Specified by:
      element in class NullabilityAnnotationInfo
      Returns:
      The value of the element attribute
    • qualifiedName

      String qualifiedName()
      Overrides:
      qualifiedName in class NullabilityAnnotationInfo
      Returns:
      The computed-at-construction value of the qualifiedName attribute
    • simpleName

      String simpleName()
      Overrides:
      simpleName in class NullabilityAnnotationInfo
      Returns:
      The computed-at-construction value of the simpleName attribute
    • withElement

      public final ImmutableNullabilityAnnotationInfo withElement(TypeElement value)
      Copy the current immutable object by setting a value for the element attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for element
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableNullabilityAnnotationInfo that have equal attribute values. As instances of the ImmutableNullabilityAnnotationInfo class are interned, the equals method is implemented as an efficient reference equality check.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableNullabilityAnnotationInfo another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: qualifiedName, simpleName.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value NullabilityAnnotationInfo with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • asPrefix

      String asPrefix()

      Returns a lazily initialized value of the asPrefix attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      asPrefix in class NullabilityAnnotationInfo
      Returns:
      A lazily initialized value of the asPrefix attribute
    • asLocalPrefix

      String asLocalPrefix()

      Returns a lazily initialized value of the asLocalPrefix attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      asLocalPrefix in class NullabilityAnnotationInfo
      Returns:
      A lazily initialized value of the asLocalPrefix attribute
    • of

      public static ImmutableNullabilityAnnotationInfo of(TypeElement element)
      Construct a new immutable NullabilityAnnotationInfo instance.
      Parameters:
      element - The value for the element attribute
      Returns:
      An immutable NullabilityAnnotationInfo instance
    • validate

    • copyOf

      Creates an immutable copy of a NullabilityAnnotationInfo 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 NullabilityAnnotationInfo instance