Skip to content

Tag: kotlin

Access Kotlin Jooq generated sources in JAVA

I am using Jooq 3.14.7 version to generate Kotlin sources. My code base has both Java and Kotlin class and we are transitioning to Kotlin. I am able to access Jooq sources in Kotlin class like below (FetchBooks.kt) But in Java classes I have to go like this below (FetchBooks.java) This seems a pretty messy wa…

.OnClickListener versus .OnChildClickListener

I know that (View.)OnClickListener is called whenever a view has been clicked on. What I don’t understand properly is, what OnChildClickListener does. I also wanted to know the difference between them. P.S. I have read Android’s documentation on OnChildClickListener but I am not able to grasp the …

Using kotlin extension function in Java code

I have created an extension function for listening to click listener for buttons, when I try to access it from Java code it does not work, Cannot access clicks() from java file, this is what I tried Can you please suggest how to resolve this. Thanks R File – Extension.kt In my java code – FillingF…

Invoke nested deepobject method via reflection

Is it possible to invoke nested method inside nested object from real object using reflection? Something like this Real object i have is chatClient and i want to invoke method of class3, which i cannot obtain directly but via class1 path. Answer You can have a logic of fetching nested fields in a function ins…