Support class reference expressions without kotlin-reflect.jar in classpath
Currently not much you can do with them, but in the future '.java' extension property will allow to get the Class instance from it. Also introduce codegen tests with stdlib but without reflection in the classpath. Based on the work by @dnpetrov
This commit is contained in:
@@ -31,18 +31,16 @@ import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.
|
||||
import java.lang.reflect.Constructor
|
||||
import java.lang.reflect.Field
|
||||
import java.lang.reflect.Method
|
||||
import kotlin.jvm.internal.DeclarationContainerImpl
|
||||
import kotlin.reflect.KCallable
|
||||
import kotlin.reflect.KDeclarationContainer
|
||||
import kotlin.reflect.KotlinReflectionInternalError
|
||||
|
||||
abstract class KCallableContainerImpl : KDeclarationContainer {
|
||||
abstract class KCallableContainerImpl : DeclarationContainerImpl {
|
||||
// Note: this is stored here on a soft reference to prevent GC from destroying the weak reference to it in the moduleByClassLoader cache
|
||||
val moduleData by ReflectProperties.lazySoft {
|
||||
jClass.getOrCreateModule()
|
||||
}
|
||||
|
||||
abstract val jClass: Class<*>
|
||||
|
||||
abstract val scope: JetScope
|
||||
|
||||
abstract val constructorDescriptors: Collection<ConstructorDescriptor>
|
||||
|
||||
Reference in New Issue
Block a user