Example #1
0
 public Map<String, ClassDescriptor> getPrimitiveWrappersClassDescriptorMap() {
   if (classDescriptorMap == null) {
     classDescriptorMap = new HashMap<String, ClassDescriptor>();
     for (JvmPrimitiveType jvmPrimitiveType : JvmPrimitiveType.values()) {
       PrimitiveType primitiveType = jvmPrimitiveType.getPrimitiveType();
       classDescriptorMap.put(
           jvmPrimitiveType.getWrapper().getFqName(),
           standardLibrary.getPrimitiveClassDescriptor(primitiveType));
     }
     classDescriptorMap.put("java.lang.String", standardLibrary.getString());
     classDescriptorMap.put("java.lang.CharSequence", standardLibrary.getCharSequence());
     classDescriptorMap.put("java.lang.Throwable", standardLibrary.getThrowable());
   }
   return classDescriptorMap;
 }
Example #2
0
 public Map<String, JetType> getClassTypesMap() {
   if (classTypesMap == null) {
     classTypesMap = new HashMap<String, JetType>();
     for (JvmPrimitiveType jvmPrimitiveType : JvmPrimitiveType.values()) {
       PrimitiveType primitiveType = jvmPrimitiveType.getPrimitiveType();
       classTypesMap.put(
           jvmPrimitiveType.getWrapper().getFqName(),
           standardLibrary.getNullablePrimitiveJetType(primitiveType));
     }
     classTypesMap.put("java.lang.Object", JetStandardClasses.getNullableAnyType());
     classTypesMap.put("java.lang.String", standardLibrary.getNullableStringType());
     classTypesMap.put("java.lang.CharSequence", standardLibrary.getNullableCharSequenceType());
     classTypesMap.put("java.lang.Throwable", standardLibrary.getThrowableType());
   }
   return classTypesMap;
 }
Example #3
0
 public Map<String, JetType> getPrimitiveTypesMap() {
   if (primitiveTypesMap == null) {
     primitiveTypesMap = new HashMap<String, JetType>();
     for (JvmPrimitiveType jvmPrimitiveType : JvmPrimitiveType.values()) {
       PrimitiveType primitiveType = jvmPrimitiveType.getPrimitiveType();
       primitiveTypesMap.put(
           jvmPrimitiveType.getName(), standardLibrary.getPrimitiveJetType(primitiveType));
       primitiveTypesMap.put(
           "[" + jvmPrimitiveType.getName(),
           standardLibrary.getPrimitiveArrayJetType(primitiveType));
       primitiveTypesMap.put(
           jvmPrimitiveType.getWrapper().getFqName(),
           standardLibrary.getNullablePrimitiveJetType(primitiveType));
     }
     primitiveTypesMap.put("void", JetStandardClasses.getUnitType());
   }
   return primitiveTypesMap;
 }