@TargetSE(valueSE={METHODSE,PARAMETERSE,FIELDSE}) @RetentionSE(valueSE=RUNTIMESE) @DocumentedSE @NonnullSE(whenSE=MAYBE) @TypeQualifierNicknameSE public @interface Nullable
null
になる可能性があることを宣言する一般的な Spring アノテーション。JSR-305 メタアノテーションを利用して、JSR-305 をサポートする一般的なツールに対して Java の null 可能性を示し、Kotlin が Spring API の null 可能性を推測するために使用します。
パラメーター、戻り値、フィールドレベルで使用する必要があります。メソッドのオーバーライドでは、動作が異なる場合を除き、親 @Nullable
アノテーションを繰り返す必要があります。
@NonNullApi
または @NonNullFields
と組み合わせて使用して、デフォルトの null 不可のセマンティクスを null 可能にオーバーライドできます。
NonNullApi
, NonNullFields
, NonNull