Move jvm annotations and class mapping intrinsics to runtime.jvm module to kotlin.jvm package.

Make annotationClass to be a property.
Deprecate with error javaClass property on KClass<T>
This commit is contained in:
Ilya Gorbunov
2015-11-26 16:11:55 +03:00
parent feff5b2327
commit 5aff07561d
9 changed files with 85 additions and 32 deletions
@@ -134,7 +134,7 @@ internal class KClassImpl<T : Any>(override val jClass: Class<T>) : KDeclaration
val packageName = classId.packageFqName.asString()
val className = classId.relativeClassName.asString().replace('.', '$')
// All pseudo-classes like String.Companion must be accessible from the current class loader
javaClass.safeClassLoader.tryLoadClass("$packageName.$className")
(this as Any).javaClass.safeClassLoader.tryLoadClass("$packageName.$className")
}
else -> throw KotlinReflectionInternalError("Unsupported class: $nestedClass (source = $source)")
}