Edm*_*984 10 java annotations scala
在我的代码的许多方面,三个注释一起出现:
@BeanProperty
@(SpaceProperty @beanGetter)(nullValue="0")
Run Code Online (Sandbox Code Playgroud)
where nullValue="0"
是注释的参数SpaceProperty
.
是否可以为单个类型别名定义@BeanProperty @(SpaceProperty @beangetter)
?
我能做的最好的事情是:
type ScalaSpaceProperty = SpaceProperty @beanGetter
@BeanProperty
@(ScalaSpaceProperty)(nullValue = "0")
Run Code Online (Sandbox Code Playgroud)
是否可以为两个注释定义一个类型别名,其中参数应用于最后一个?
不,我认为您可以在 Scala 2.10 中编写一个宏来执行此操作(但目前没有文档,因此我无法检查)。
归档时间: |
|
查看次数: |
873 次 |
最近记录: |