If you mean in JDEE when you say "if there is a way to detect
unused code" I do not think so. 

It could be done though, using semantic and static analysis.
I am not sure if semantic parses the method bodies though.
Some code may present itself as used but may not get actually
called e.g. overridden methods, classes loaded using Class.forName().

There are tools out there which will analyze the coverage.
There was one called JCover from sun labs.

-sandip

> -----Original Message-----
> From: otisg [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 06, 2002 8:38 AM
> To: [EMAIL PROTECTED]
> Subject: Dead code detection?
> 
> 
> Hello,
> 
> I was wondering if there is a way to detect
> unused code in a set of Java .java or .class
> files, using JDE.
> Unused code would be things such as
> variables that are never referenced, methods
> that are never called, classes that are
> never referenced nor instantiated, etc.
> 
> Thanks,
> Otis
> 
> 
> ________________________________________________
> Get your own "800" number
> Voicemail, fax, email, and a lot more
> http://www.ureach.com/reg/tag
> 

Reply via email to