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 -----Original Message----- From: Scott Ellsworth [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 3:44 PM To: Ant List Subject: Tool to find unused methods Hi, all. We have twenty-some-odd projects that are built via ant, and then assembled into a few dozen executables. These have grown organically for several years, and thus have a fair amount of detritus in the java files. It would be really neat to find methods and classes that have become out of date, stale, or just plain superfluous. For example, we would love to know which of our many projects are still using which deprecated methods, and how many users there are of some methods we have not yet decided to deprecate. Can anyone recommend a hopefully open source tool that works well with ant which will tell us what we are not using? I could accept sending it a single or small list of method signatures and the jars that might use them, in return for a list of dependent classes. (I looked at depend, but it did not seem to do this in a human readable form.) Scott -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
