@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface AssertNonNullIfNonNull
Here is an example use::
@AssertNonNullIfNonNull("id")
public @Pure @Nullable Long getId(){
return id;
}
You should not write a formal parameter name or this
as the argument of this annotation. In those cases, use the PolyNull
annotation instead.NonNull
,
PolyNull
,
NullnessChecker
public abstract String[] value