ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Java implementation selector
Date Wed, 17 Mar 2004 15:38:48 GMT
> From: []
> Never used but sounds that XDoclet [1] has on build-in :-)

Unless I'm mistaken, XDoclet works off .java files, not .class files.

> > -----Original Message-----
> > From: David Corbin []
> >
> > Is there a selector available that will select files (.class
> > files)  base on
> > Java inheritance?   That is, I'd like to find all the .class
> > files that
> > implement another specified class.
> >
> > Is a selector the right way for this to be implemented?

Yes, a selector is the right way, depending on the type of inheritance
you want to detect.

A Selector is stateless, i.e. it only knows about the current file
you are processing. By using BCEL or ASM, you can easily learn a lot
about that class file itself, but it does not contain all the type
information about that class, AFAIK. For example, to know all the
super classes of a class, you'd have to load other .class files to
following the inheritance tree. This requires a mechanism to locate
other classes, using a classpath.

I guess you could have a selector taking a classpath, and loading all
the dependent classes of every class you visit, but usually (and
preferably to me), selectors should be able to decide selection of a
given file based on the file itself only.

I hope this helps. --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message