Searching for (and remove) unreferenced methods

  • Thread starter Rogue Chameleon
  • Start date
R

Rogue Chameleon

Hi all

FYI: We are using WSAD 5.0 as our IDE.

Is there a simple (perhaps automated) way to find all methods in a
project that are not referenced by any other methods/classes? I'm sure
that there are some in our project, but short of checking each method
individually, I don't know how to get at them.

rogue chameleon
 
H

Heiner Kücker

Rogue Chameleon wrote
FYI: We are using WSAD 5.0 as our IDE.

Is there a simple (perhaps automated) way to find all methods in a
project that are not referenced by any other methods/classes? I'm sure
that there are some in our project, but short of checking each method
individually, I don't know how to get at them.

rogue chameleon

In Menu Window -> Preferences -> Java -> Compiler -> Problems
is possible to set:
unused private types, methods or fields:
Warning

This works only for private methods, but for other scopes.

It's possible to using public methods per reflection.
This is the reason for no checking this methods.

Heiner Kuecker
Internet: http://www.heinerkuecker.de http://www.heiner-kuecker.de
JSP WorkFlow PageFlow Page Flow FlowControl Navigation: http://www.control-and-command.de
Expression Language Parser: http://www.heinerkuecker.de/Expression.html
 
M

Martin Egholm Nielsen

Is there a simple (perhaps automated) way to find all methods in a
project that are not referenced by any other methods/classes? I'm sure
that there are some in our project, but short of checking each method
individually, I don't know how to get at them.
You should look at ProGuard - it's an optimisation tool that does that -
but to the compiled class-files, though. However, I reckon you can ask
it to tell which methods are unused...

// Martin Egholm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top