The Intrinsics class contains the some sanity check logic used for example for not-null properties (without ?) and other constraint-checks. The package constains some classes that are required at runtime, as they are compiled into the resultingĬlass files. The retention-policy is CLASS only, so the annotation cannot be read using reflection and thus the org.jetbrains annotations.jar is not necessarily required at runtime. Unfortunately the JSR-305 was never properly released, so Kotlin uses the IntelliJ specific class, which feels kind of murky but cannot be changed. Kotlin Kotlin compiler might also add a annotation to fields or methods which should never contain/return null values.
0 Comments
Leave a Reply. |