Let's say I have a class like below
public class ClassDemo {
/*
private String getData() {
String s = "testClass";
return s;
}
*/
}
In the above class the only method it has was commented out. This is literally useless. Since I have a lot of classes in a package it's not easy to identify as there is no dependency on this class or methods inside this class.
I use Maven to build. Is there a way to identify such classes?
I understand it's possible to achieve that using eclipse. But is there a way to detect that in build tools like Maven, Ant etc?