Class ImmutableNullabilityAnnotationInfo
NullabilityAnnotationInfo.
Use the static factory method to create immutable instances:
ImmutableNullabilityAnnotationInfo.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate static final classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate static final longprivate Stringprivate Stringprivate final TypeElementprivate longprivate final Stringprivate final Stringprivate static final byteprivate static final byteprivate static final byte -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateprivateImmutableNullabilityAnnotationInfo(ImmutableNullabilityAnnotationInfo original, TypeElement element) -
Method Summary
Modifier and TypeMethodDescription(package private) String(package private) StringasPrefix()copyOf(NullabilityAnnotationInfo instance) Creates an immutable copy of aNullabilityAnnotationInfovalue.(package private) TypeElementelement()booleanThis instance is equal to all instances ofImmutableNullabilityAnnotationInfothat have equal attribute values.private booleanequalTo(int synthetic, ImmutableNullabilityAnnotationInfo another) inthashCode()Computes a hash code from attributes:qualifiedName,simpleName.of(TypeElement element) Construct a new immutableNullabilityAnnotationInfoinstance.(package private) String(package private) StringtoString()Prints the immutable valueNullabilityAnnotationInfowith attribute values.private static ImmutableNullabilityAnnotationInfovalidate(ImmutableNullabilityAnnotationInfo instance) withElement(TypeElement value) Copy the current immutable object by setting a value for theelementattribute.Methods inherited from class org.immutables.value.processor.meta.NullabilityAnnotationInfo
asPrefixOriginal, forTypeUse, forTypeUse, isSynthetic
-
Field Details
-
element
-
qualifiedName
-
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
-
lazyInitBitmap
private transient volatile long lazyInitBitmap -
AS_PREFIX_LAZY_INIT_BIT
private static final long AS_PREFIX_LAZY_INIT_BIT- See Also:
-
asPrefix
-
AS_LOCAL_PREFIX_LAZY_INIT_BIT
private static final long AS_LOCAL_PREFIX_LAZY_INIT_BIT- See Also:
-
asLocalPrefix
-
-
Constructor Details
-
ImmutableNullabilityAnnotationInfo
-
ImmutableNullabilityAnnotationInfo
private ImmutableNullabilityAnnotationInfo(ImmutableNullabilityAnnotationInfo original, TypeElement element)
-
-
Method Details
-
element
TypeElement element()- Specified by:
elementin classNullabilityAnnotationInfo- Returns:
- The value of the
elementattribute
-
qualifiedName
String qualifiedName()- Overrides:
qualifiedNamein classNullabilityAnnotationInfo- Returns:
- The computed-at-construction value of the
qualifiedNameattribute
-
simpleName
String simpleName()- Overrides:
simpleNamein classNullabilityAnnotationInfo- Returns:
- The computed-at-construction value of the
simpleNameattribute
-
withElement
Copy the current immutable object by setting a value for theelementattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for element- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableNullabilityAnnotationInfothat have equal attribute values. As instances of theImmutableNullabilityAnnotationInfoclass are interned, theequalsmethod is implemented as an efficient reference equality check. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:qualifiedName,simpleName. -
toString
Prints the immutable valueNullabilityAnnotationInfowith attribute values. -
asPrefix
String asPrefix()Returns a lazily initialized value of the
asPrefixattribute. 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:
asPrefixin classNullabilityAnnotationInfo- Returns:
- A lazily initialized value of the
asPrefixattribute
-
asLocalPrefix
String asLocalPrefix()Returns a lazily initialized value of the
asLocalPrefixattribute. 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:
asLocalPrefixin classNullabilityAnnotationInfo- Returns:
- A lazily initialized value of the
asLocalPrefixattribute
-
of
Construct a new immutableNullabilityAnnotationInfoinstance.- Parameters:
element- The value for theelementattribute- Returns:
- An immutable NullabilityAnnotationInfo instance
-
validate
private static ImmutableNullabilityAnnotationInfo validate(ImmutableNullabilityAnnotationInfo instance) -
copyOf
Creates an immutable copy of aNullabilityAnnotationInfovalue. 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
-