我正在编写小而非常DRY的框架,它严重依赖于元数据.我想知道是否有办法获取方法参数名称,即给定一些方法
public void a(int myIntParam, String theString) { ... }
Run Code Online (Sandbox Code Playgroud)
得到字符串"myIntParam"和"theString".
我知道我可以注释参数,但这不会很好......
public void a(
@Param("myIntParam") int myIntParam,
@Param("theString") String theString
) { ... }
Run Code Online (Sandbox Code Playgroud)