注释局部变量或方法参数

fly*_*ire 0 java variables annotations metaprogramming

根据API中的类ElementType,您可以注释局部变量和方法参数.

怎么做的?

gus*_*afc 6

通常的方式:

void method(@SomeAttr int param){
    @SomeAttr 
    int local = param * 2;
}
Run Code Online (Sandbox Code Playgroud)