I'm surprised this is needed. I've never seen a warning about an unused public method in a public class. Without this, do you see a warning in the ant/maven build, or just in your IDE?