Hi,
For Servlet annotation scanning, I would need the following APIs:
- For Servlet annotation processing, query classes from a JAR for a set of annotations (on fields, methods, type); could return a Set keyed per annotation (given the current org.jboss.metadata.annotation.creator.Processor a simple set of classes would be ok too)
- For ServletContainerInitializer implementation, query classes from a "classpath" (a list of VirtualFile) for a set of annotations (on fields, methods, type) and implemented interfaces/classes; return a set of classes
This would translate to something like:
- public Set<Class<?>> getClasses(VirtualFile classpathItem, Set<Class<? extends Annotation>> annotationsToLookFor) (from the Hibernate plugin, assuming it looks for annotation on fields, methods and type), or return a Map<Class<? extends Annotation>>, Class<?>>
- public Set<Class<?>> getClasses(List<VirtualFile> classpath, Set<Class<? extends Annotation>> annotationsToLookFor, Set<Class<?>> supertypesToLookFor) (note: in case there are multiple SCIs with HandlesType, this could be less efficient than using a map to pass the annotations/types to look for, and getting a map back; of course, it is simpler too)
The plugin could be based on the Hibernate one, it looks the closest to the requirements.
Thanks,
Rémy