Simplify property hierarchy in reflection

Leave only 3*2 = 6 classes: KProperty0, KProperty1, KProperty2 and their
mutable analogs, depending on the number of receivers a property takes
This commit is contained in:
Alexander Udalov
2015-06-26 16:40:39 +03:00
parent c3b97e0668
commit 30794060a9
58 changed files with 374 additions and 653 deletions
@@ -17,10 +17,10 @@ public class JavaClass {
import kotlin.reflect.*
fun test() {
val pubFinRef: KMemberProperty<JavaClass, Int> = JavaClass::publicFinal
val pubMutRef: KMutableMemberProperty<JavaClass, Long> = JavaClass::publicMutable
val protFinRef: KMemberProperty<JavaClass, Double> = JavaClass::protectedFinal
val protMutRef: KMutableMemberProperty<JavaClass, Char> = JavaClass::protectedMutable
val privFinRef: KMemberProperty<JavaClass, String?> = JavaClass::<!INVISIBLE_MEMBER!>privateFinal<!>
val privMutRef: KMutableMemberProperty<JavaClass, Any?> = JavaClass::<!INVISIBLE_MEMBER!>privateMutable<!>
val pubFinRef: KProperty1<JavaClass, Int> = JavaClass::publicFinal
val pubMutRef: KMutableProperty1<JavaClass, Long> = JavaClass::publicMutable
val protFinRef: KProperty1<JavaClass, Double> = JavaClass::protectedFinal
val protMutRef: KMutableProperty1<JavaClass, Char> = JavaClass::protectedMutable
val privFinRef: KProperty1<JavaClass, String?> = JavaClass::<!INVISIBLE_MEMBER!>privateFinal<!>
val privMutRef: KMutableProperty1<JavaClass, Any?> = JavaClass::<!INVISIBLE_MEMBER!>privateMutable<!>
}