Salad:Scala宏和反射库

时间:2021-05-19 09:52:18
【文件属性】:
文件名称:Salad:Scala宏和反射库
文件大小:24KB
文件格式:ZIP
更新时间:2021-05-19 09:52:18
Scala #沙拉 使用Scala宏和反射的库。 例子 遍历类型结构 如果定义如下: package example trait SampleStructure { def x : Int def y : SampleGeneric [ String , Long , Int ] def z : List [ Int ] } trait SampleGeneric [ A , B , C ]{ def a : A def b : B def c : Nested [ Nested [ Nested [ C ]]] } trait Nested [ A ]{ def foo : A } 您可以通过TypeReflector对此进行TypeReflector 。 val digest = TypeReflector .inspect[ SampleStructure
【文件预览】:
Salad-master
----project()
--------SaladBuild.scala(732B)
----salad-sample()
--------src()
----.travis.yml(97B)
----LICENSE(1KB)
----README.md(3KB)
----salad-lib()
--------src()
----.gitignore(193B)

网友评论