注释局部变量或方法参数 [英] annotating local variables or method parameters
本文介绍了注释局部变量或方法参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
据类元素类型在API中,你可以注释局部变量和方法参数。
According to the class ElementType in the API, you can annotate local variables and method parameters.
如何做呢?
推荐答案
只是通常的方式:
void method(@SomeAttr int param){
@SomeAttr
int local = param * 2;
}
这篇关于注释局部变量或方法参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文