Agreed. The product my company produces depends on dynamic class loading alot. That is
why we can't really use code obfusication without alot of work.
Paul Franz
----- Original Message -----
From: Drew Davidson <[EMAIL PROTECTED]>
Date: Mon, 25 Mar 2002 09:22:50 -0700
To: Ant Users List <[EMAIL PROTECTED]>
Subject: Re: Tool to find unused methods
> Dominique Devienne wrote:
>
> > I remember there's a Java tools with an ANT wrapper that can generate a JAR
> > file with only the pieces needed by an application. You give it a few
> > starting classes, and it finds and adds to the JAR all the dependent
> > classes. I believe it's on sourceforge, but I can't remember its name. It's
> > the closest I can think of your problem. The granularity is at the class
> > level, since concerns itself with generating JARs, but maybe it can be used
> > at the method level???
> >
> > Also, you might use Jakarta's BCEL to parse class files, including the code
> > of methods.
> >
> > Something you might try is to use javap.exe to convert the class file in
> > ASCII, and grep/seach it!?!?!?
> >
> > I hope this helps. --DD
>
> I generally wouldn't want to use such tools in any code for which you don't
> have intimate knowledge because java allows lots of dynamic behaviour wrt class
> loading. I can do:
>
> Class.forName("com.foo.Foo")
>
> without having to import com.foo.Foo, so a dependency analysis based on imports
> will fail to add com.foo.Foo.class to the jar.
>
> - Drew
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Email.com
http://www.email.com/?sr=signup
Win the Ultimate Hawaiian Experience from Travelocity.
http://ad.doubleclick.net/clk;4018363;6991039;n?http://svc.travelocity.com/promos/winhawaii/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>