Last active
August 29, 2015 14:23
-
-
Save chandu0101/7d0267e9de320097222c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait CommonValueClass extends Any | |
class Type1 private(val name : String) extends CommonValueClass | |
object Type1 { | |
val SCALA = new Type1("scala") | |
} | |
class Type2 private(val option : String) extends CommonValueClass | |
object Type2 { | |
val LEFT = new Type2("left") | |
} | |
// my classes | |
case class Test1(optionType : Type2) | |
case class Test2(nameType : Type1) | |
i want to generate some code for these classes based on params using macros | |
is it possible to get the public porperty of value classes in generic way ? | |
or i must define abstract method getValue in CommonValueClass trait ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment