patterntesting.annotation.check.runtime
Annotation Type NotNull


@Documented
@Retention(value=RUNTIME)
@Target(value={PARAMETER,METHOD,FIELD})
public @interface NotNull

In contradiction to the NullPointerTrap which forbids all null arguments you can use a more relax strategy and mark only these parameter (and attributes) as "@NotNull" which should never be null.
You can also mark fields with this annotation but this is at the moment not evaluated. But you can use it for documentation purposes. The same is true if you mark a method as @NotNull.

Since:
06.12.2008