0

The only solution I know to get all the classes and examine whether they have a specific annotation.

  for (Class clazz : classes){
            clazz.isAnnotationPresent(SomeAnnotation.class);
  }

I would like to use something like this:

 List<Class> classesUsingAnnotation = SomeApi.getAllTargetTypeForAnnotation(SomeAnnotation.class)

Is there any API out there for this?

beatrice
  • 2,768
  • 3
  • 17
  • 31

0 Answers0