ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <tanguy.rademak...@swift.com>
Subject Re: Java implementation selector
Date Wed, 17 Mar 2004 16:02:23 GMT
whoops. ignore that. i rtfm and ClassFileSet goes the other way (finds 
the classes a given class depends on, not the classes that depend on a 
given class)
/t


RADEMAKERS Tanguy wrote:

>>
>>
>> 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.
>>
>>  
>>
>
> please correct me if i'm wrong, but doesn't the ClassFileSet with 
> nested RootFileSet already acheive this?
>
> /t
>
>
> Dominique Devienne wrote:
>
>>> 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
>>
>>
>>
>>  
>>
>

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


Mime
View raw message