Top Description Methods
org.jetbrains.annotations

public @Interface UnknownNullability

extends Annotation
Annotations
@Documented
@Retention:CLASS
@Target:TYPE_USE
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target

An element annotated with UnknownNullability claims that no specific nullability should be assumed by static analyzer. The unconditional dereference of the annotated value should not trigger a static analysis warning by default (though static analysis tool may have an option to perform stricter analysis and issue warnings for @UnknownNullability as well). It's mainly useful at method return types to mark methods that may occasionally return null but in many cases, user knows that in this particular code path null is not possible, so producing a warning would be annoying.

The UnknownNullability is the default nullability for unannotated methods, so it's rarely necessary. An explicit annotation may serve to document the method behavior and also to override automatic annotation inference result that could be implemented in some static analysis tools.

Method Summary

Modifier and TypeMethod and Description
public @NonNls String

Returns:

textual reason when the annotated value could be null, for documentation purposes.
value
()

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public @NonNls String value()
Returns:@NonNls String

textual reason when the annotated value could be null, for documentation purposes.

Annotations
@NonNls