Nullable
@Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.ANNOTATION_CLASS]) class Nullable
androidx.annotation.Nullable |
Denotes that a parameter, field or method return value can be null.
When decorating a method call parameter, this denotes that the parameter can legitimately be null and the method will gracefully deal with it. Typically used on optional parameters.
When decorating a method, this denotes the method might legitimately return null.
This is a marker annotation and it has no specific attributes.
Summary
Public constructors | |
---|---|
<init>() Denotes that a parameter, field or method return value can be null. |
Public constructors
<init>
Nullable()
Denotes that a parameter, field or method return value can be null.
When decorating a method call parameter, this denotes that the parameter can legitimately be null and the method will gracefully deal with it. Typically used on optional parameters.
When decorating a method, this denotes the method might legitimately return null.
This is a marker annotation and it has no specific attributes.