Scala Type aliases for annotations

后端 未结 3 715
栀梦
栀梦 2021-01-02 02:33

In many points of my code, three annotations appears together:

@BeanProperty
@(SpaceProperty @beanGetter)(nullValue=\"0\")

where null

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-02 03:04

    Does this work?

    type MyAnnotation[+X] = @BeanProperty
                            @(SpaceProperty @beanGetter)(nullValue = 0) X
    
    val myValue: MyAnnotation[MyType] 
    

提交回复
热议问题