Disperse primitive type mapping in JavaToKotlinClassMap

This commit is contained in:
Alexander Udalov
2015-04-21 04:19:47 +03:00
parent d86b9c8f54
commit 0a66c78449
6 changed files with 41 additions and 37 deletions
@@ -17,7 +17,10 @@
package org.jetbrains.kotlin.load.java.structure.reflect
import org.jetbrains.kotlin.load.java.structure.JavaPrimitiveType
import org.jetbrains.kotlin.resolve.jvm.JvmPrimitiveType
public class ReflectJavaPrimitiveType(override val type: Class<*>): ReflectJavaType(), JavaPrimitiveType {
override fun getCanonicalText() = type.getName()
public class ReflectJavaPrimitiveType(override val type: Class<*>) : ReflectJavaType(), JavaPrimitiveType {
override fun getType() =
if (type == Void.TYPE) null
else JvmPrimitiveType.get(type.getName()).getPrimitiveType()
}