Presumably, persistence at run time allowed the AOP proxy to detect null arguments passed to the @Nonnull-annotated parameter and throw an exception or otherwise handle it. You could argue that this is the best way to handle runtime checks using explicit null code verification.
Yes, these annotations are very useful for statically checking compilation, but there is no reason why they could not be used at run time for the same purpose. Their validity as annotations extends to the runtime domain, in contrast to annotations that are used for things like code generation.
source
share