My task is to find case class parameter names for which there are default values.
In 2.9, I used ScalaSigParser from Skype and did something similar to:
(...) case x: MethodSymbol if x.name.startsWith("init$default$") => (...) (...)
I was hoping that the reflection in 2.10 would give me easier access to this information.
In the end, I would like to write a macro that I would include in the companion class class, which will automatically generate code to serialize / deserialize this case class. To do this, I need to know which parameters have default values.
macros reflection scala
Jarek odzga
source share