Remy Maucherat [http://community.jboss.org/people/remy.maucherat%40jboss.com] 
created the discussion

"Servlet Scanner plugin"

To view the discussion, visit: http://community.jboss.org/message/533736#533736

--------------------------------------------------------------
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

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/533736#533736]

Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2115]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to