I have a code generator which generates classes with a lot of private code like:
class A {
private void meth1() { ... }
private int var1;
private class SubA { private void meth2() {...} }
}
I'm looking for a tool which would remove all unused private fields/methods and inner classes without human intervention. I would also like it to work on source code instead of byte code to be able to conduct metrics on the generated source code. Changing the code generator would be possible but I'm looking for something simpler.