How to get all public fields (including inherited) and their values from the object of Scala class?
This:
class A(val a: String)
class B(val b: String) extends A("a")
val b = new B("b")
b.getClass.getFields
returns empty list.
How to get all public fields (including inherited) and their values from the object of Scala class?
This:
class A(val a: String)
class B(val b: String) extends A("a")
val b = new B("b")
b.getClass.getFields
returns empty list.