TimurMahammadov / google-collections

Automatically exported from code.google.com/p/google-collections
Apache License 2.0
0 stars 0 forks source link

Add @NonNullable annotation #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The @Nullable annotation is a good way of positively identifying that a
parameter may be null. The converse may in fact be more useful - specifying
that a parameter *may not* be null.

Aside from adding to the documentary benefit that @Nullable provides,
@NonNullable could be used to actively check the precondition that the
parameter it marks is non-null, using AOP. This would be a neat way of
checking this precondition, without having to directly run the
Preconditions#checkNotNull(T) check as the first line of the method.

Original issue reported on code.google.com by joe.kear...@gtempaccount.com on 27 Feb 2008 at 2:11

GoogleCodeExporter commented 9 years ago
This is a job for another library, or JSR-305.  We're going to get rid of 
Nullable
when we can.

Original comment by kevin...@gmail.com on 24 Mar 2008 at 8:29