You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|Any.getPropertyValue(propertyName: String): Any?|get object property value by name|
31
+
|Any.changePropertyValue(propertyName: String, newValue: Any?) |change object property value by name|
32
+
|Any.changePropertyValueIgnoreItsType(propertyName: String, newValue: Any?)|change object property value by name|
33
+
|Any.changePropertyValueByPropertyReference(kProperty: KProperty<R>, newValue: Any?)|change object property value by name|
34
+
|Any.invokeMethod(methodName: String, vararg args: Any?): Any?|invoke a method through object by method name|
35
+
|<R> KProperty<R>.changeValue(thisObj: Any, newValue: Any?)|change current this property valuev|
36
+
|<R> KProperty<R>.packageLevelGetPropertyValueByName(otherPropertyName: String): Any? |get other package level property value by other package level property name which is in the same kotlin file|
37
+
|<R> KFunction<R>.packageLevelGetPropertyValueByName(otherPropertyName: String): Any?|get other package level property value by other package level property name which is in the same kotlin file|
|<R> KProperty<R>.packageLevelChangeOtherPropertyValueByName(otherPropertyName: String, newValue: Any?)|change other package level property value by other package level property name which is in the same kotlin file|
40
+
|<R> KFunction<R>.packageLevelChangeOtherPropertyValueByName(otherPropertyName: String, newValue: Any?)|change other package level property value by other package level property name which is in the same kotlin file|
41
+
|<R> KProperty<R>.packageLevelInvokeMethodByName(methodName: String, vararg args: Any?): Any? |invoke package level method by name which is in the same kotlin file|
42
+
|<R> KFunction<R>.packageLevelInvokeMethodByName(methodName: String, vararg args: Any?): Any?|invoke package level method by name which is in the same kotlin file|
43
+
44
+
### API since 1.0
28
45
|Method | Describe |
29
46
| ------------- |:-------------|
30
47
|changeTopPropertyValue | change the top level property value |
@@ -42,19 +59,12 @@ All method don't care what the property or method visibility it is
42
59
## Demo
43
60
For example a Kotlin file like this:
44
61
```kotlin
62
+
45
63
val topName = "topSeal"
64
+
val topNameWu = "topSealWu"
46
65
private val topAge = 666
47
-
private val topAgeName = "666"
48
-
private fun preTopAge(): Int {
49
-
return funPropertyReduceAge(topAge)
50
-
}
51
-
private fun nextTopAge(): Int {
52
-
return funPropertyPlusAge(topAge)
53
-
}
54
-
55
-
val funPropertyPlusAge: (Int) -> Int = { age -> age + 1 }
56
66
57
-
val funPropertyReduceAge: (Int) -> Int = { age -> age - 1 }
0 commit comments