JSR305
JSR305, also known as the Java Specification Request 305, is a part of the Java programming language specification that deals with annotations for type use. It was introduced to provide a standard way to use annotations on types, methods, fields, and other elements in Java. This specification is part of the broader Java Language Specification (JLS) and is designed to enhance the expressiveness and flexibility of Java annotations.
The primary goal of JSR305 is to define a set of standard annotations that can be used
Some of the key annotations defined in JSR305 include:
@Nullable: Indicates that a method, field, or parameter can return or accept a null value.
@Nonnull: Indicates that a method, field, or parameter cannot return or accept a null value.
@CheckForNull: Indicates that a method, field, or parameter can return or accept a null value, but the
@NonNull: Indicates that a method, field, or parameter cannot return or accept a null value, and the
These annotations can be used in combination with other tools and frameworks, such as the Checker Framework,
JSR305 has been widely adopted in the Java community and is supported by many popular libraries and