@NotNull public KotlinType getArrayElementType(@NotNull KotlinType arrayType) { if (isArray(arrayType)) { if (arrayType.getArguments().size() != 1) { throw new IllegalStateException(); } return arrayType.getArguments().get(0).getType(); } KotlinType primitiveType = kotlinArrayTypeToPrimitiveKotlinType.get(TypeUtils.makeNotNullable(arrayType)); if (primitiveType == null) { throw new IllegalStateException("not array: " + arrayType); } return primitiveType; }
@NotNull public KotlinType getNullableAnyType() { return TypeUtils.makeNullable(getAnyType()); }
@NotNull public KotlinType getNullableNothingType() { return TypeUtils.makeNullable(getNothingType()); }