--- JavaScript is disabled on your browser. --- Skip navigation links --- Overview Package Class Tree Deprecated Index Help --- Prev Class Next Class --- Frames No Frames --- All Classes --- Summary:  Field |  Required |  Optional --- Detail:  Field |  Element --- org.jetbrains.annotations Annotation Type NotNull --- @Documented @Retention(value=CLASS) @Target(value={METHOD,FIELD,PARAMETER,LOCAL_VARIABLE,TYPE_USE}) public @interface NotNull An element annotated with NotNull claims null value is forbidden to return (for methods), pass to (parameters) and hold (local variables and fields). Apart from documentation purposes this annotation is intended to be used by static analysis tools to validate against probable runtime errors and element contract violations. If a field is annotated as @NotNull it's expected to be initialized during object construction. Tools may issue a warning if it's not the case. If a method overrides a superclass method, and the superclass method specifies the nullability on parameter or return type, then the subclass method should specify the same nullability, either directly or indirectly via NotNullByDefault. The only exception is the covariant return type nullability: if the superclass method is declared to return nullable value, then subclass may declare to return a not-null value. The tools may issue a warning if the nullability for a subclass method contradicts from the specified nullability of a superclass method. See Also: Nullable --- Optional Element Summary Optional Elements  Modifier and Type Optional Element and Description --- java.lang.Class exception  --- java.lang.String value  --- Element Detail --- value public abstract java.lang.String value Returns: Custom exception message --- Default: "" --- exception public abstract java.lang.Class exception Returns: Custom exception type that should be thrown when not-nullity contract is violated. The exception class should have a constructor with one String argument (message). By default, IllegalArgumentException is thrown on null method arguments and IllegalStateException — on null return value. --- Default: java.lang.Exception.class --- Skip navigation links --- Overview Package Class Tree Deprecated Index Help --- Prev Class Next Class --- Frames No Frames --- All Classes --- Summary:  Field |  Required |  Optional --- Detail:  Field |  Element ---