jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James CE Johnson" <j...@tragus.org>
Subject Re: New bcel user question
Date Tue, 05 Aug 2003 20:29:24 GMT
> James CE Johnson wrote:
>> I think I'm trying to reinvent what you did :-) I may be able to use
>> your analyzer directly.
>
> Suppose there was the APL at the beginning of the file...
>
>> What I want to do is start at a particular object in
>> our model tier and find all of the classes that use that. Then all of
>> the classes that use those. And so on and so fort. It should
>> eventually terminate at our view tier. If it doesn't then we've
>> managed to orphan something.
>
> Watch out for the traps. The analyzer doesn't do a real flow
> analysis, therefore you could have orphaned classes without
> really noting it (instances created only by unreachable code).
> Furthermore, object instances may be created through reflection.
> I tried to solve this by adding all subclasses but I already
> found that something goes amiss, perhaps because the optimizer
> inlines stuff or omits no-op code.

Yea, I don't expect to have something that'll perfectly find all orphans.
If it'll just give me a handful of starting points I'll be much further
along than I am.

Using your code I've narrowed this:
        Class foo = Synthetic.class;
down to a getstatic opcode.

Mime
View raw message