Пример #1
0
  private void makePrimitive(@NotNull PrimitiveType primitiveType) {
    KotlinType type = getBuiltInTypeByClassName(primitiveType.getTypeName().asString());
    KotlinType arrayType = getBuiltInTypeByClassName(primitiveType.getArrayTypeName().asString());

    primitiveTypeToArrayKotlinType.put(primitiveType, arrayType);
    primitiveKotlinTypeToKotlinArrayType.put(type, arrayType);
    kotlinArrayTypeToPrimitiveKotlinType.put(arrayType, type);
  }
Пример #2
0
 {
   fqNameToPrimitiveType = new HashMap<FqNameUnsafe, PrimitiveType>(0);
   arrayClassFqNameToPrimitiveType = new HashMap<FqNameUnsafe, PrimitiveType>(0);
   for (PrimitiveType primitiveType : PrimitiveType.values()) {
     fqNameToPrimitiveType.put(
         fqNameUnsafe(primitiveType.getTypeName().asString()), primitiveType);
     arrayClassFqNameToPrimitiveType.put(
         fqNameUnsafe(primitiveType.getArrayTypeName().asString()), primitiveType);
   }
 }
Пример #3
0
 @NotNull
 public ClassDescriptor getPrimitiveArrayClassDescriptor(@NotNull PrimitiveType type) {
   return getBuiltInClassByName(type.getArrayTypeName().asString());
 }