Charlie Tapping
02/01/2023, 3:08 PMExample.foo(x: Any)
Then for every given different type of x, I would need to add an implementation for a interface to that type.
The interface basically encodes the type to and from a hashmap by iterating all of the properties in the class recursively, turning the object into a HashMap<String, String>
For example if you called:
Example.foo(user: User)
and
data class User(
private val name: String,
private val age: Int
)
I would generate
data class User(
private val name: String,
private val age: Int
) : Adapter {
fun fromHashmap() {
...
}
fun toHashmap() {
...
}
}
Is this possible? Any help would be greatly appreciated!natario1
02/03/2023, 7:40 PMPeter Mandeljc
02/06/2023, 6:58 PMCharlie Tapping
02/13/2023, 6:11 PM