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
  • 3,684
  • 5
  • 22
  • 49

0 Answers0