Class 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 Detail

      • element

        private final javax.lang.model.element.TypeElement element
      • qualifiedName

        private final transient java.lang.String qualifiedName
      • simpleName

        private final transient java.lang.String simpleName
      • lazyInitBitmap

        private transient volatile long lazyInitBitmap
      • AS_PREFIX_LAZY_INIT_BIT

        private static final long AS_PREFIX_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • asPrefix

        private transient java.lang.String asPrefix
      • AS_LOCAL_PREFIX_LAZY_INIT_BIT

        private static final long AS_LOCAL_PREFIX_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • asLocalPrefix

        private transient java.lang.String asLocalPrefix
    • Constructor Detail

      • ImmutableNullabilityAnnotationInfo

        private ImmutableNullabilityAnnotationInfo​(javax.lang.model.element.TypeElement element)
      • ImmutableNullabilityAnnotationInfo

        private ImmutableNullabilityAnnotationInfo​(ImmutableNullabilityAnnotationInfo original,
                                                   javax.lang.model.element.TypeElement element)
    • Method Detail

      • element

        javax.lang.model.element.TypeElement element()
        Specified by:
        element in class NullabilityAnnotationInfo
        Returns:
        The value of the element attribute
      • withElement

        public final ImmutableNullabilityAnnotationInfo withElement​(javax.lang.model.element.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
                              java.lang.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 java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

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

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

        java.lang.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

        java.lang.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​(javax.lang.model.element.TypeElement element)
        Construct a new immutable NullabilityAnnotationInfo instance.
        Parameters:
        element - The value for the element attribute
        Returns:
        An immutable NullabilityAnnotationInfo instance