Skip to content

Commit ad51767

Browse files
committed
Kotlin: Add comment describing Kotlin array predicates
1 parent c1a5203 commit ad51767

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,20 @@ open class KotlinUsesExtractor(
551551
)
552552
}
553553

554+
/*
555+
Kotlin arrays can be broken down as:
556+
557+
isArray(t)
558+
|- t.isBoxedArray
559+
| |- t.isArray() e.g. Array<Boolean>, Array<Boolean?>
560+
| |- t.isNullableArray() e.g. Array<Boolean>?, Array<Boolean?>?
561+
|- t.isPrimitiveArray() e.g. BooleanArray
562+
563+
For the corresponding Java types:
564+
Boxed arrays are represented as e.g. java.lang.Boolean[].
565+
Primitive arrays are represented as e.g. boolean[].
566+
*/
567+
554568
data class ArrayInfo(val elementTypeResults: TypeResults,
555569
val componentTypeResults: TypeResults,
556570
val dimensions: Int)

0 commit comments

Comments
 (0)