0
我将使用特定示例使其更容易理解。将自定义方法添加到系统类
而不是使用:
Annotation[] annotations = method.getAnnotations();
我希望能够得到与每个注释相关联的类类型的数组:
Class<?>[] annotationClasses = method.getAnnotationTypes();
有没有办法覆盖的方法类,并添加我的自定义方法,它将使用getAnnotations来收集注释,但返回类类型而不是Annotation类型?