Package lombok

Annotation Type NonNull


  • @Target({FIELD,METHOD,PARAMETER,LOCAL_VARIABLE,TYPE_USE})
    @Retention(CLASS)
    @Documented
    public @interface NonNull
    If put on a parameter, lombok will insert a null-check at the start of the method / constructor's body, throwing a NullPointerException with the parameter's name as message. If put on a field, any generated method assigning a value to this field will also produce these null-checks.