CDI类BeanManager有几种采用类型Annotation或参数的方法Annotation....例如BeanManager.getBeans(...).
我想知道我应该如何将我的注释作为参数传递给那些方法.
我试过了BeanManager.getBeans(MyBean.class, MyAnnotation.class),但是不行.我见过Class.isAnnotation(),但没有什么比Class.asAnnotation()把它作为一种Annotation类型来检索它了.
既没有BeanManager.getBeans(MyBean.class, @MyAnnotation)工作,也没有工作BeanManager.getBeans(MyBean.class, (Annotation) MyAnnotation.class).
如何将我的注释类检索为类型Annotation?