On Fri, Jun 11, 2010 at 1:38 AM, Bill Burke <bburke(a)redhat.com> wrote:
Is there a special deployer API for scanning for classes that extend
or
implement a specific interface?
Yes, the web scanning plugin does that, you can use it in a deployer.
import org.jboss.scanning.web.spi.ResourcesIndex;
addInput(ResourcesIndex.class);
ResourcesIndex ri = unit.getAttachment(ResourcesIndex.class);
VirtualFile classpathItem; Class<?> type;
Set classes = ri.getInheritedClasses(classpathItem, type);
I did not verify the actual results yet. For David, I use it for SCI,
which is a Servlet 3 feature, and having to use it with type Object is
also a possibility.
Rémy