Skip to content

avaje/avaje-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Maven Central License JDK EA

avaje-lang

Provides @NonNullAPI and @Nullable for APIs

Step 1. Add dependency

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-lang</artifactId>
      <version>1.1</version>
    </dependency>

Step 2. Put @NonNullAPI on either package-info or a type

This defines the return type and parameters to be @Nonnull by default

Step 3. Put @Nullable on anything that can be nullable

How it works

These annotations are meta annotations using jsr-305 annotations (javax.annotation) and are then honored by most tools - IntelliJ etc.

Note that these annotations are RetentionType CLASS and expected to be used at compile time only via static analysis and can not be read or used at runtime.

The jsr-305 annotations are not required to be a transitive dependency for the tooling like IntelliJ to recognise and use.

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages