在我自己的项目中,我自定义一个注解
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface ExcelSheet {
/**
* 表格类别
* @return
*/
String value();
/**
* 创建的顺序(越大越往后执行)
* @return
*/
int index();
}
用来标注一些方法
例如:
@ExcelSheet(value = "excel", index = 1)
public void firstCallImpl() {
//一些执行的代码
}
我现在的需求:
如果有多个方法被这个注解标注了那么,我能通过这个注解获取这个方法吗?
感谢大佬们的回答