ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Corbin <dcor...@machturtle.com>
Subject Re: Java implementation selector
Date Thu, 18 Mar 2004 12:09:32 GMT
On Wednesday 17 March 2004 10:51, Jan.Materne@rzf.fin-nrw.de wrote:
> Sorry, you (DD) are right.
> Then I donĀ“t know any. So you (David) have to write it for yourself :-)
> A little introspection, instantiation, ...
>
> It would be simpler if you have the sources. Then use XDoclet to find the
> right classes (*.java), and use a mapper to generate your result (*.class).
>

I do have the source?  How can I use xdoclet to find the right classes?  Also, 
my experience with xdoclet is that it's very slow, even when it has nothing 
to do.  I think if I have to depend on xdoclet, I'd be better off just always 
doing the task in question....

David
>
> Jan
>
> > -----Original Message-----
> > From: Dominique Devienne [mailto:DDevienne@lgc.com]
> > Sent: Wednesday, March 17, 2004 4:39 PM
> > To: 'Ant Users List'
> > Subject: RE: Java implementation selector
> >
> > > From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
> > >
> > > 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 [mailto:dcorbin@machturtle.com]
> > > >
> > > > 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: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org

-- 
David Corbin <dcorbin@machturtle.com>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message