Minor, add KCallableImpl#container
This commit is contained in:
@@ -24,7 +24,7 @@ import kotlin.reflect.jvm.internal.JvmPropertySignature.JavaField
|
||||
import kotlin.reflect.jvm.internal.JvmPropertySignature.KotlinProperty
|
||||
|
||||
internal abstract class DescriptorBasedProperty<out R> protected constructor(
|
||||
val container: KDeclarationContainerImpl,
|
||||
override val container: KDeclarationContainerImpl,
|
||||
name: String,
|
||||
val signature: String,
|
||||
descriptorInitialValue: PropertyDescriptor?
|
||||
|
||||
@@ -33,6 +33,8 @@ internal interface KCallableImpl<out R> : KCallable<R>, KAnnotatedElementImpl {
|
||||
|
||||
val defaultCaller: FunctionCaller<*>?
|
||||
|
||||
val container: KDeclarationContainerImpl
|
||||
|
||||
override val annotated: Annotated get() = descriptor
|
||||
|
||||
override val parameters: List<KParameter>
|
||||
|
||||
@@ -28,7 +28,7 @@ import kotlin.reflect.KotlinReflectionInternalError
|
||||
import kotlin.reflect.jvm.internal.JvmFunctionSignature.*
|
||||
|
||||
internal open class KFunctionImpl protected constructor(
|
||||
private val container: KDeclarationContainerImpl,
|
||||
override val container: KDeclarationContainerImpl,
|
||||
name: String,
|
||||
private val signature: String,
|
||||
descriptorInitialValue: FunctionDescriptor?
|
||||
|
||||
@@ -31,8 +31,6 @@ import kotlin.reflect.KProperty
|
||||
internal interface KPropertyImpl<out R> : KProperty<R>, KCallableImpl<R> {
|
||||
val javaField: Field?
|
||||
|
||||
val container: KDeclarationContainerImpl
|
||||
|
||||
val signature: String
|
||||
|
||||
override val getter: Getter<R>
|
||||
@@ -54,6 +52,8 @@ internal interface KPropertyImpl<out R> : KProperty<R>, KCallableImpl<R> {
|
||||
abstract class Getter<out R> : Accessor<R>(), KProperty.Getter<R>, KCallableImpl<R> {
|
||||
override val name: String get() = "<get-${property.name}>"
|
||||
|
||||
override val container: KDeclarationContainerImpl get() = property.container
|
||||
|
||||
override val descriptor: PropertyGetterDescriptor by ReflectProperties.lazySoft {
|
||||
// TODO: default getter created this way won't have any source information
|
||||
property.descriptor.getter ?: DescriptorFactory.createDefaultGetter(property.descriptor, Annotations.EMPTY)
|
||||
@@ -76,6 +76,8 @@ internal interface KMutablePropertyImpl<R> : KMutableProperty<R>, KPropertyImpl<
|
||||
|
||||
override val name: String get() = "<set-${property.name}>"
|
||||
|
||||
override val container: KDeclarationContainerImpl get() = property.container
|
||||
|
||||
override val descriptor: PropertySetterDescriptor by ReflectProperties.lazySoft {
|
||||
// TODO: default setter created this way won't have any source information
|
||||
property.descriptor.setter ?: DescriptorFactory.createDefaultSetter(property.descriptor, Annotations.EMPTY)
|
||||
|
||||
Reference in New Issue
Block a user