rename platformStatic to jvmStatic
This commit is contained in:
@@ -66,7 +66,11 @@ open class KFunctionImpl protected constructor(
|
||||
is Constructor<*> -> FunctionCaller.Constructor(member)
|
||||
is Method -> when {
|
||||
!Modifier.isStatic(member.modifiers) -> FunctionCaller.InstanceMethod(member)
|
||||
descriptor.annotations.findAnnotation(PLATFORM_STATIC) != null -> FunctionCaller.PlatformStaticInObject(member)
|
||||
|
||||
descriptor.annotations.findAnnotation(PLATFORM_STATIC) != null,
|
||||
descriptor.annotations.findAnnotation(JVM_STATIC) != null->
|
||||
FunctionCaller.PlatformStaticInObject(member)
|
||||
|
||||
else -> FunctionCaller.StaticMethod(member)
|
||||
}
|
||||
else -> throw KotlinReflectionInternalError("Call is not yet supported for this function: $descriptor")
|
||||
|
||||
@@ -80,7 +80,8 @@ interface KMutablePropertyImpl<R> : KMutableProperty<R>, KPropertyImpl<R> {
|
||||
|
||||
private fun KPropertyImpl.Accessor<*>.computeCallerForAccessor(isGetter: Boolean): FunctionCaller<*> {
|
||||
fun isPlatformStaticProperty() =
|
||||
property.descriptor.annotations.findAnnotation(PLATFORM_STATIC) != null
|
||||
property.descriptor.annotations.findAnnotation(PLATFORM_STATIC) != null ||
|
||||
property.descriptor.annotations.findAnnotation(JVM_STATIC) != null
|
||||
|
||||
fun isNotNullProperty() =
|
||||
!TypeUtils.isNullableType(property.descriptor.type)
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.name.FqName
|
||||
import kotlin.reflect.IllegalCallableAccessException
|
||||
|
||||
internal val PLATFORM_STATIC = FqName("kotlin.platform.platformStatic")
|
||||
internal val JVM_STATIC = FqName("kotlin.jvm.jvmStatic")
|
||||
|
||||
// TODO: wrap other exceptions
|
||||
internal inline fun <R> reflectionCall(block: () -> R): R =
|
||||
|
||||
Reference in New Issue
Block a user