It's difficult to do this reliably, since the introspection mechanism can be used to build up a method name from
string functions. And, of course, if you're using library jars, there's probably going to be hundreds of unused methods which would have to be ignored, since "unused" doesn't mean "useless".
I generally just flag everything suspect as private and see what doesn't compile, but there is a code improvement tool I used to use. I think it was called something like "Bug Buddy". I don't know if it can detect unused code, but it was pretty good at rooting out a whole bunch of potential problems.
I'd forgotten all about it. I need to find it again.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.