é©å½ãªã¤ã³ã¹ã¿ã³ã¹ãã JSON æååãåºåããããªã¼ã¨æããæè§ãªã®ã§ Refrection ã使ã£ã¦ãã£ã¦ã¿ãã reflection Scala(Java?) ã§ã® Reflection 㯠obj.getClass ã§ã¯ã©ã¹æ å ±ãåå¾ããã¨ããããã åå¾ããã¯ã©ã¹ã«å¯¾ã㦠getDeclaredFields, getDeclaredMethods ãå¼ã³åºããã¨ã§ã¡ã³ãã®æ å ±ãåããã®ã§ãå¾ã¯ã好ããªããã«ã åå¾ãã method 㯠invoke ã§å¼ã³åºããã ã§ãããã® abstract class Dumpable { def dumpMap(): Map[String, Any] = { val cls = this.getClass cls.getDeclaredFields.map(_.getName).map( x=>(x, cls.getDeclaredMe
{{#tags}}- {{label}}
{{/tags}}