Basic Java nullability warnings implemented

#KT-6723 In Progress
This commit is contained in:
Andrey Breslav
2015-02-03 15:08:37 +03:00
parent 29d24374d6
commit 5db6bb04e3
44 changed files with 953 additions and 15 deletions
@@ -362,7 +362,8 @@ class LazyJavaTypeAttributes(
private fun Annotations.isMarkedReadOnly() = findAnnotation(JvmAnnotationNames.JETBRAINS_READONLY_ANNOTATION) != null
private fun Annotations.isMarkedMutable() = findAnnotation(JvmAnnotationNames.JETBRAINS_MUTABLE_ANNOTATION) != null
private fun Annotations.isMarkedNotNull() = findAnnotation(JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION) != null
internal fun Annotations.isMarkedNotNull() = findAnnotation(JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION) != null
internal fun Annotations.isMarkedNullable() = findAnnotation(JvmAnnotationNames.JETBRAINS_NULLABLE_ANNOTATION) != null
fun TypeUsage.toAttributes(allowFlexible: Boolean = true) = object : JavaTypeAttributes {
override val howThisTypeIsUsed: TypeUsage = this@toAttributes