I'm refactoring a java project. It seems that there are a lot of code (methods) used only within unit tests.
Is there a tool which could find all those methods?
So I'll need to find a list of methods within com.XXX
projects which are:
- used only within
com.XXX.test.XXX
classes - not marked with JMX autowired annotation
- classes themselves are not in
com.XXX.test
packages
I'd better to have it as a list, so I could attach it into the ticket within task-tracking system (bugzilla, jira)
I think that reflection could be used, but don't like to reinvent the wheel. Maybe there is a lib for that?
PS. there is a note that How to find unused/dead code in java projects question is the same, but there is a slight difference: the code is used, but in XXXTestXXX.java files.