[jboss-dev] Way to scan for classes that extend or implement
Bill Burke
bburke at redhat.com
Mon Jun 14 09:43:26 EDT 2010
I also have written a scanner plugin that indexes classes that implement
anntotations that are annotated with:
i.e.
@Path
public interface MyResource {}
public class MyResourceImpl implements MyResource {}
Set<String> classes =
interfaceIndex.getAnntoationIndex(Path.class.getName())
Ales Justin wrote:
> I've fixed this in scanning trunk, so you don't need the url anymore.
> If null, the whole deployment unit's owning classpath will be checked.
>
> For the moment you can use the scanning trunk's snapshot - the api is still the same,
> and I'll try to do new release asap -- need to fix some CL & Deployers issue before doing the whole cycle.
>
>
> On Jun 11, 2010, at 10:46 PM, Rémy Maucherat wrote:
>
>> On Fri, Jun 11, 2010 at 5:35 PM, Bill Burke <bburke at redhat.com> wrote:
>>> Hmmm, where you get the classpathItem from then? AnnotationIndex
>>> doesn't require for you to provide this info.
>> It's just a regular VirtualFile to the JAR or exploded folder. For the
>> classpath you could do:
>> List<VirtualFile> classpath = (VFSDeploymentUnit) unit.getClassPath();
>>
>> Rémy
>>
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
>
>
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
More information about the jboss-development
mailing list