Idea 14 includes support for JSR 305 annotation "@TypeQualifierDefault", which allows the user to create a custom annotation that will be used in the package declaration in the package-info.java file, which indicates that everything in this package (not just parameters, but return values methods, local variables, etc.) will be implicitly annotated as not allowing zero values.
Unfortunately, this does not recursively affect subpackages, so each subpackage must have a package-info.java file, declaring that the subpackage should use annotation.
See here for details and usage example:
http://youtrack.jetbrains.com/issue/IDEA-125281
Note that this is already implemented in versions of the Early Access Program (EAP).
source share