fly*_*ire 0 java variables annotations metaprogramming
根据API中的类ElementType,您可以注释局部变量和方法参数.
怎么做的?
通常的方式:
void method(@SomeAttr int param){
@SomeAttr
int local = param * 2;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1407 次 |
| 最近记录: |