how can i get all members of a class
# kotlin-native
s
how can i get all members of a class
g
You cannot, there are no reflections or other generic way to do that in K/N
s
ok
o
It is possible in compile time using compiler plugin, and this is preferred way of meta-programming in Kotlin in general.
s
how would i do so?
g
But compiler plugins do not have any public API, no documentation, as I understand, highly coupled with compiler now, so backward compatibility may be broken on any next release, also you don't have any tooling support, so it probably require also Kotlin IDE plugin changes if plugin affects syntax So even though there are no real good alternatives (maybe except using some additional code generation), investing to compiler plugin make sense if you have no other choices and if you really know what you are doing
s
oh
e
@Smallville7123 So the question that should have been asked here: What are you trying to achieve? Why do you need to get all members of a class?