isNullableAnnotation

fun isNullableAnnotation(simpleName: String, qualifiedName: String? = null): Boolean(source)

Checks whether the given annotation is recognized as a nullable marker (e.g. @Nullable).

A property carrying a matching annotation is treated as if its type were nullable, the same way Kotlin's ? is handled — mainly useful for front ends without native nullable types (e.g. Java/APT).

Simple annotation names are matched case-insensitively; fully qualified names are matched case-sensitively (exact match).

Return

true if the annotation is recognized as a nullable marker

Parameters

simpleName

The simple name of the annotation (e.g., "Nullable")

qualifiedName

The fully qualified name of the annotation, or null if unavailable