How to obtain Properties or Function declared in kotlin extensions by java reflection
问题 If I declare an extension function or some Extension Properties in Kotlin like this var View.newPosition: Int get():Int { return newPosition } set(value) { this.newPosition=value Log.e("test","newPosition"+newPosition) } fun View.setPosition(value:Int ){ Log.e("test", "Position" + value) } Then I want to obtain them by Java reflection like this Class stuClass = null; try { stuClass = Class.forName("android.view.View"); } catch (Exception e) { Log.e("test", e.toString()); } Field f = null; try