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; }
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; }