# NonNullApi

@Target(value = [ElementType.TYPE, ElementType.PACKAGE])
@NotNull
@Nonnull
@TypeQualifierDefault(value = [ElementType.METHOD, ElementType.PARAMETER])
@Documented
@Retention(value = RetentionPolicy.RUNTIME)
annotation class NonNullApi(source)

### Deprecated

Deprecated in Gradle 9 for removal in Gradle 10. Prefer JSpecify annotations such as org.jspecify.annotations.NullMarked and org.jspecify.annotations.Nullable. Note that you can also still use JSR305 annotations such as javax.annotation.Nonnull and javax.annotation.Nullable.

Marks a type or a whole package as providing a non-null API by default. All parameter and return types are assumed to be javax.annotation.Nonnull unless specifically marked as javax.annotation.Nullable. All types of an annotated package inherit the package rule. Subpackages do not inherit nullability rules and must be annotated.

#### Since

4.2

## Functions

annotationType
Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
equals
Link copied to clipboard
abstract fun equals(p: Any): Boolean
hashCode
Link copied to clipboard
abstract fun hashCode(): Int
toString
Link copied to clipboard
abstract fun toString(): String