diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KCallableImpl.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KCallableImpl.kt index 3ffb1b3ea0b..23e227c00dc 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KCallableImpl.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KCallableImpl.kt @@ -15,16 +15,17 @@ import java.lang.reflect.WildcardType import java.util.* import kotlin.coroutines.Continuation import kotlin.reflect.* +import kotlin.reflect.jvm.internal.calls.Caller import kotlin.reflect.jvm.javaType internal abstract class KCallableImpl : KCallable { abstract val descriptor: CallableMemberDescriptor // The instance which is used to perform a positional call, i.e. `call` - abstract val caller: FunctionCaller<*> + abstract val caller: Caller<*> // The instance which is used to perform a call "by name", i.e. `callBy` - abstract val defaultCaller: FunctionCaller<*>? + abstract val defaultCaller: Caller<*>? abstract val container: KDeclarationContainerImpl diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.kt index e4f0dc32847..b82d5f95573 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.kt @@ -25,11 +25,12 @@ import java.lang.reflect.Modifier import kotlin.jvm.internal.CallableReference import kotlin.jvm.internal.FunctionBase import kotlin.reflect.KFunction -import kotlin.reflect.jvm.internal.AnnotationConstructorCaller.CallMode.CALL_BY_NAME -import kotlin.reflect.jvm.internal.AnnotationConstructorCaller.CallMode.POSITIONAL_CALL -import kotlin.reflect.jvm.internal.AnnotationConstructorCaller.Origin.JAVA -import kotlin.reflect.jvm.internal.AnnotationConstructorCaller.Origin.KOTLIN import kotlin.reflect.jvm.internal.JvmFunctionSignature.* +import kotlin.reflect.jvm.internal.calls.* +import kotlin.reflect.jvm.internal.calls.AnnotationConstructorCaller.CallMode.CALL_BY_NAME +import kotlin.reflect.jvm.internal.calls.AnnotationConstructorCaller.CallMode.POSITIONAL_CALL +import kotlin.reflect.jvm.internal.calls.AnnotationConstructorCaller.Origin.JAVA +import kotlin.reflect.jvm.internal.calls.AnnotationConstructorCaller.Origin.KOTLIN internal class KFunctionImpl private constructor( override val container: KDeclarationContainerImpl, @@ -56,7 +57,7 @@ internal class KFunctionImpl private constructor( override val name: String get() = descriptor.name.asString() - override val caller: FunctionCaller<*> by ReflectProperties.lazySoft caller@{ + override val caller: Caller<*> by ReflectProperties.lazySoft caller@{ val jvmSignature = RuntimeTypeMapper.mapSignature(descriptor) val member: Member? = when (jvmSignature) { is KotlinConstructor -> { @@ -89,7 +90,7 @@ internal class KFunctionImpl private constructor( } } - override val defaultCaller: FunctionCaller<*>? by ReflectProperties.lazySoft defaultCaller@{ + override val defaultCaller: Caller<*>? by ReflectProperties.lazySoft defaultCaller@{ val jvmSignature = RuntimeTypeMapper.mapSignature(descriptor) val member: Member? = when (jvmSignature) { is KotlinFunction -> { @@ -132,16 +133,16 @@ internal class KFunctionImpl private constructor( } private fun createStaticMethodCaller(member: Method) = - if (isBound) FunctionCaller.BoundStaticMethod(member, boundReceiver) else FunctionCaller.StaticMethod(member) + if (isBound) CallerImpl.BoundStaticMethod(member, boundReceiver) else CallerImpl.StaticMethod(member) private fun createJvmStaticInObjectCaller(member: Method) = - if (isBound) FunctionCaller.BoundJvmStaticInObject(member) else FunctionCaller.JvmStaticInObject(member) + if (isBound) CallerImpl.BoundJvmStaticInObject(member) else CallerImpl.JvmStaticInObject(member) private fun createInstanceMethodCaller(member: Method) = - if (isBound) FunctionCaller.BoundInstanceMethod(member, boundReceiver) else FunctionCaller.InstanceMethod(member) + if (isBound) CallerImpl.BoundInstanceMethod(member, boundReceiver) else CallerImpl.InstanceMethod(member) private fun createConstructorCaller(member: Constructor<*>) = - if (isBound) FunctionCaller.BoundConstructor(member, boundReceiver) else FunctionCaller.Constructor(member) + if (isBound) CallerImpl.BoundConstructor(member, boundReceiver) else CallerImpl.Constructor(member) override val arity: Int get() = caller.arity diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KPropertyImpl.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KPropertyImpl.kt index c05e496507f..83ffa8bd58b 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KPropertyImpl.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KPropertyImpl.kt @@ -21,6 +21,9 @@ import kotlin.reflect.KMutableProperty import kotlin.reflect.KProperty import kotlin.reflect.full.IllegalPropertyDelegateAccessException import kotlin.reflect.jvm.internal.JvmPropertySignature.* +import kotlin.reflect.jvm.internal.calls.Caller +import kotlin.reflect.jvm.internal.calls.CallerImpl +import kotlin.reflect.jvm.internal.calls.ThrowingCaller internal abstract class KPropertyImpl private constructor( override val container: KDeclarationContainerImpl, @@ -99,9 +102,9 @@ internal abstract class KPropertyImpl private constructor( override val descriptor: PropertyDescriptor get() = _descriptor() - override val caller: FunctionCaller<*> get() = getter.caller + override val caller: Caller<*> get() = getter.caller - override val defaultCaller: FunctionCaller<*>? get() = getter.defaultCaller + override val defaultCaller: Caller<*>? get() = getter.defaultCaller override val isLateinit: Boolean get() = descriptor.isLateInit @@ -128,7 +131,7 @@ internal abstract class KPropertyImpl private constructor( override val container: KDeclarationContainerImpl get() = property.container - override val defaultCaller: FunctionCaller<*>? get() = null + override val defaultCaller: Caller<*>? get() = null override val isBound: Boolean get() = property.isBound @@ -147,7 +150,7 @@ internal abstract class KPropertyImpl private constructor( property.descriptor.getter ?: DescriptorFactory.createDefaultGetter(property.descriptor, Annotations.EMPTY) } - override val caller: FunctionCaller<*> by ReflectProperties.lazySoft { + override val caller: Caller<*> by ReflectProperties.lazySoft { computeCallerForAccessor(isGetter = true) } } @@ -160,7 +163,7 @@ internal abstract class KPropertyImpl private constructor( property.descriptor.setter ?: DescriptorFactory.createDefaultSetter(property.descriptor, Annotations.EMPTY, Annotations.EMPTY) } - override val caller: FunctionCaller<*> by ReflectProperties.lazySoft { + override val caller: Caller<*> by ReflectProperties.lazySoft { computeCallerForAccessor(isGetter = false) } } @@ -171,9 +174,9 @@ internal abstract class KPropertyImpl private constructor( } -private fun KPropertyImpl.Accessor<*, *>.computeCallerForAccessor(isGetter: Boolean): FunctionCaller<*> { +private fun KPropertyImpl.Accessor<*, *>.computeCallerForAccessor(isGetter: Boolean): Caller<*> { if (KDeclarationContainerImpl.LOCAL_PROPERTY_SIGNATURE.matches(property.signature)) { - return FunctionCaller.ThrowingCaller + return ThrowingCaller } fun isInsideClassCompanionObject(): Boolean { @@ -201,33 +204,33 @@ private fun KPropertyImpl.Accessor<*, *>.computeCallerForAccessor(isGetter: Bool fun isNotNullProperty() = !TypeUtils.isNullableType(property.descriptor.type) - fun computeFieldCaller(field: Field): FunctionCaller = when { + fun computeFieldCaller(field: Field): Caller = when { isInsideClassCompanionObject() || isInsideInterfaceCompanionObjectWithJvmField() -> { val klass = (descriptor.containingDeclaration as ClassDescriptor).toJavaClass()!! if (isGetter) - if (isBound) FunctionCaller.BoundClassCompanionFieldGetter(field, klass) - else FunctionCaller.ClassCompanionFieldGetter(field, klass) + if (isBound) CallerImpl.BoundClassCompanionFieldGetter(field, klass) + else CallerImpl.ClassCompanionFieldGetter(field, klass) else - if (isBound) FunctionCaller.BoundClassCompanionFieldSetter(field, klass) - else FunctionCaller.ClassCompanionFieldSetter(field, klass) + if (isBound) CallerImpl.BoundClassCompanionFieldSetter(field, klass) + else CallerImpl.ClassCompanionFieldSetter(field, klass) } !Modifier.isStatic(field.modifiers) -> if (isGetter) - if (isBound) FunctionCaller.BoundInstanceFieldGetter(field, property.boundReceiver) - else FunctionCaller.InstanceFieldGetter(field) + if (isBound) CallerImpl.BoundInstanceFieldGetter(field, property.boundReceiver) + else CallerImpl.InstanceFieldGetter(field) else - if (isBound) FunctionCaller.BoundInstanceFieldSetter(field, isNotNullProperty(), property.boundReceiver) - else FunctionCaller.InstanceFieldSetter(field, isNotNullProperty()) + if (isBound) CallerImpl.BoundInstanceFieldSetter(field, isNotNullProperty(), property.boundReceiver) + else CallerImpl.InstanceFieldSetter(field, isNotNullProperty()) isJvmStaticProperty() -> if (isGetter) - if (isBound) FunctionCaller.BoundJvmStaticInObjectFieldGetter(field) - else FunctionCaller.JvmStaticInObjectFieldGetter(field) + if (isBound) CallerImpl.BoundJvmStaticInObjectFieldGetter(field) + else CallerImpl.JvmStaticInObjectFieldGetter(field) else - if (isBound) FunctionCaller.BoundJvmStaticInObjectFieldSetter(field, isNotNullProperty()) - else FunctionCaller.JvmStaticInObjectFieldSetter(field, isNotNullProperty()) + if (isBound) CallerImpl.BoundJvmStaticInObjectFieldSetter(field, isNotNullProperty()) + else CallerImpl.JvmStaticInObjectFieldSetter(field, isNotNullProperty()) else -> - if (isGetter) FunctionCaller.StaticFieldGetter(field) - else FunctionCaller.StaticFieldSetter(field, isNotNullProperty()) + if (isGetter) CallerImpl.StaticFieldGetter(field) + else CallerImpl.StaticFieldSetter(field, isNotNullProperty()) } val jvmSignature = RuntimeTypeMapper.mapPropertySignature(property.descriptor) @@ -250,18 +253,17 @@ private fun KPropertyImpl.Accessor<*, *>.computeCallerForAccessor(isGetter: Bool when { accessor == null -> computeFieldCaller( - property.javaField - ?: throw KotlinReflectionInternalError("No accessors or field is found for property $property") + property.javaField ?: throw KotlinReflectionInternalError("No accessors or field is found for property $property") ) !Modifier.isStatic(accessor.modifiers) -> - if (isBound) FunctionCaller.BoundInstanceMethod(accessor, property.boundReceiver) - else FunctionCaller.InstanceMethod(accessor) + if (isBound) CallerImpl.BoundInstanceMethod(accessor, property.boundReceiver) + else CallerImpl.InstanceMethod(accessor) isJvmStaticProperty() -> - if (isBound) FunctionCaller.BoundJvmStaticInObject(accessor) - else FunctionCaller.JvmStaticInObject(accessor) + if (isBound) CallerImpl.BoundJvmStaticInObject(accessor) + else CallerImpl.JvmStaticInObject(accessor) else -> - if (isBound) FunctionCaller.BoundStaticMethod(accessor, property.boundReceiver) - else FunctionCaller.StaticMethod(accessor) + if (isBound) CallerImpl.BoundStaticMethod(accessor, property.boundReceiver) + else CallerImpl.StaticMethod(accessor) } } is JavaField -> { @@ -273,22 +275,21 @@ private fun KPropertyImpl.Accessor<*, *>.computeCallerForAccessor(isGetter: Bool else jvmSignature.setterMethod ?: throw KotlinReflectionInternalError( "No source found for setter of Java method property: ${jvmSignature.getterMethod}" ) - if (isBound) FunctionCaller.BoundInstanceMethod(method, property.boundReceiver) - else FunctionCaller.InstanceMethod(method) + if (isBound) CallerImpl.BoundInstanceMethod(method, property.boundReceiver) + else CallerImpl.InstanceMethod(method) } is MappedKotlinProperty -> { val signature = if (isGetter) jvmSignature.getterSignature - else (jvmSignature.setterSignature - ?: throw KotlinReflectionInternalError("No setter found for property $property")) + else (jvmSignature.setterSignature ?: throw KotlinReflectionInternalError("No setter found for property $property")) val accessor = property.container.findMethodBySignature( signature.methodName, signature.methodDesc, descriptor.isPublicInBytecode ) ?: throw KotlinReflectionInternalError("No accessor found for property $property") assert(!Modifier.isStatic(accessor.modifiers)) { "Mapped property cannot have a static accessor: $property" } - return if (isBound) FunctionCaller.BoundInstanceMethod(accessor, property.boundReceiver) - else FunctionCaller.InstanceMethod(accessor) + return if (isBound) CallerImpl.BoundInstanceMethod(accessor, property.boundReceiver) + else CallerImpl.InstanceMethod(accessor) } } } diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/AnnotationConstructorCaller.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/AnnotationConstructorCaller.kt similarity index 91% rename from core/reflection.jvm/src/kotlin/reflect/jvm/internal/AnnotationConstructorCaller.kt rename to core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/AnnotationConstructorCaller.kt index ca7000c888a..32416f533b9 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/AnnotationConstructorCaller.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/AnnotationConstructorCaller.kt @@ -1,24 +1,15 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package kotlin.reflect.jvm.internal +package kotlin.reflect.jvm.internal.calls import java.lang.reflect.Proxy +import java.lang.reflect.Type import java.util.* import kotlin.reflect.KClass +import kotlin.reflect.jvm.internal.KotlinReflectionInternalError import kotlin.reflect.jvm.internal.structure.wrapperByPrimitive import java.lang.reflect.Method as ReflectMethod @@ -28,9 +19,15 @@ internal class AnnotationConstructorCaller( private val callMode: CallMode, origin: Origin, private val methods: List = parameterNames.map { name -> jClass.getDeclaredMethod(name) } -) : FunctionCaller( - null, jClass, null, methods.map { it.genericReturnType }.toTypedArray() -) { +) : Caller { + override val member: Nothing? + get() = null + + override val returnType: Type + get() = jClass + + override val parameterTypes: List = methods.map { it.genericReturnType } + enum class CallMode { CALL_BY_NAME, POSITIONAL_CALL } enum class Origin { JAVA, KOTLIN } diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/Caller.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/Caller.kt new file mode 100644 index 00000000000..56eeeb3e756 --- /dev/null +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/Caller.kt @@ -0,0 +1,28 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package kotlin.reflect.jvm.internal.calls + +import java.lang.reflect.Member +import java.lang.reflect.Type + +internal interface Caller { + val member: M + + val returnType: Type + + val parameterTypes: List + + fun checkArguments(args: Array<*>) { + if (arity != args.size) { + throw IllegalArgumentException("Callable expects $arity arguments, but ${args.size} were provided.") + } + } + + fun call(args: Array<*>): Any? +} + +internal val Caller<*>.arity: Int + get() = parameterTypes.size diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/FunctionCaller.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/CallerImpl.kt similarity index 81% rename from core/reflection.jvm/src/kotlin/reflect/jvm/internal/FunctionCaller.kt rename to core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/CallerImpl.kt index 623ba944ec5..82863fdfcb3 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/FunctionCaller.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/CallerImpl.kt @@ -1,20 +1,9 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ -package kotlin.reflect.jvm.internal +package kotlin.reflect.jvm.internal.calls import java.lang.reflect.Member import java.lang.reflect.Modifier @@ -23,35 +12,24 @@ import java.lang.reflect.Constructor as ReflectConstructor import java.lang.reflect.Field as ReflectField import java.lang.reflect.Method as ReflectMethod -internal abstract class FunctionCaller( - internal val member: M, - internal val returnType: Type, - internal val instanceClass: Class<*>?, +internal abstract class CallerImpl( + final override val member: M, + final override val returnType: Type, + val instanceClass: Class<*>?, valueParameterTypes: Array -) { - val parameterTypes: List = +) : Caller { + override val parameterTypes: List = instanceClass?.let { listOf(it, *valueParameterTypes) } ?: valueParameterTypes.toList() - val arity: Int - get() = parameterTypes.size - - abstract fun call(args: Array<*>): Any? - - protected open fun checkArguments(args: Array<*>) { - if (arity != args.size) { - throw IllegalArgumentException("Callable expects $arity arguments, but ${args.size} were provided.") - } - } - protected fun checkObjectInstance(obj: Any?) { - if (obj == null || !member!!.declaringClass.isInstance(obj)) { + if (obj == null || !member.declaringClass.isInstance(obj)) { throw IllegalArgumentException("An object member requires the object instance passed as the first argument.") } } // Constructors - class Constructor(constructor: ReflectConstructor<*>) : FunctionCaller>( + class Constructor(constructor: ReflectConstructor<*>) : CallerImpl>( constructor, constructor.declaringClass, constructor.declaringClass.let { klass -> @@ -69,7 +47,7 @@ internal abstract class FunctionCaller( // TODO fix 'callBy' for bound (and non-bound) inner class constructor references // See https://youtrack.jetbrains.com/issue/KT-14990 class BoundConstructor(constructor: ReflectConstructor<*>, private val boundReceiver: Any?) : - FunctionCaller>( + CallerImpl>( constructor, constructor.declaringClass, null, constructor.genericParameterTypes ) { @@ -85,7 +63,7 @@ internal abstract class FunctionCaller( method: ReflectMethod, requiresInstance: Boolean = !Modifier.isStatic(method.modifiers), parameterTypes: Array = method.genericParameterTypes - ) : FunctionCaller( + ) : CallerImpl( method, method.genericReturnType, if (requiresInstance) method.declaringClass else null, @@ -151,7 +129,7 @@ internal abstract class FunctionCaller( abstract class FieldGetter( field: ReflectField, requiresInstance: Boolean = !Modifier.isStatic(field.modifiers) - ) : FunctionCaller( + ) : CallerImpl( field, field.genericType, if (requiresInstance) field.declaringClass else null, @@ -167,7 +145,7 @@ internal abstract class FunctionCaller( field: ReflectField, private val notNull: Boolean, requiresInstance: Boolean = !Modifier.isStatic(field.modifiers) - ) : FunctionCaller( + ) : CallerImpl( field, Void.TYPE, if (requiresInstance) field.declaringClass else null, @@ -197,7 +175,7 @@ internal abstract class FunctionCaller( } } - class ClassCompanionFieldGetter(field: ReflectField, klass: Class<*>) : FunctionCaller( + class ClassCompanionFieldGetter(field: ReflectField, klass: Class<*>) : CallerImpl( field, field.genericType, klass, emptyArray() ) { override fun call(args: Array<*>): Any? { @@ -237,7 +215,7 @@ internal abstract class FunctionCaller( } } - class ClassCompanionFieldSetter(field: ReflectField, klass: Class<*>) : FunctionCaller( + class ClassCompanionFieldSetter(field: ReflectField, klass: Class<*>) : CallerImpl( field, Void.TYPE, klass, arrayOf(field.genericType) ) { override fun call(args: Array<*>): Any? { @@ -264,7 +242,7 @@ internal abstract class FunctionCaller( } } - class BoundClassCompanionFieldSetter(field: ReflectField, klass: Class<*>) : FunctionCaller( + class BoundClassCompanionFieldSetter(field: ReflectField, klass: Class<*>) : CallerImpl( field, Void.TYPE, klass, arrayOf(field.genericType) ) { override fun call(args: Array<*>): Any? { @@ -273,12 +251,6 @@ internal abstract class FunctionCaller( } } - object ThrowingCaller : FunctionCaller(null, Void.TYPE, null, emptyArray()) { - override fun call(args: Array<*>): Any? { - throw UnsupportedOperationException("call/callBy are not supported for this declaration.") - } - } - companion object { @Suppress("UNCHECKED_CAST") inline fun Array.dropFirst(): Array = diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/ThrowingCaller.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/ThrowingCaller.kt new file mode 100644 index 00000000000..1ecc3d016e0 --- /dev/null +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/calls/ThrowingCaller.kt @@ -0,0 +1,23 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package kotlin.reflect.jvm.internal.calls + +import java.lang.reflect.Type + +internal object ThrowingCaller : Caller { + override val member: Nothing? + get() = null + + override val parameterTypes: List + get() = emptyList() + + override val returnType: Type + get() = Void.TYPE + + override fun call(args: Array<*>): Any? { + throw UnsupportedOperationException("call/callBy are not supported for this declaration.") + } +} diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/util.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/util.kt index ef53b5757e0..5c0733d46cf 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/util.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/util.kt @@ -40,6 +40,7 @@ import kotlin.jvm.internal.FunctionReference import kotlin.jvm.internal.PropertyReference import kotlin.reflect.KVisibility import kotlin.reflect.full.IllegalCallableAccessException +import kotlin.reflect.jvm.internal.calls.createAnnotationInstance import kotlin.reflect.jvm.internal.components.ReflectAnnotationSource import kotlin.reflect.jvm.internal.components.ReflectKotlinClass import kotlin.reflect.jvm.internal.components.RuntimeSourceElementFactory