I had an idea for an inspection. Let's say I have some UglyClass with 30 public
methods. Now I have UserClass which takes an instance of UglyClass as
constructor, and stores it in a field. However, UserClass only uses 2 of those
30 methods. I think this shows that it's time to extract an interface. An
inspection could pretty easily find this.
What do you guys think? I don't use Dependency Injection things like
picocontainer, so maybe people who have experience with that will have some
ideas for this inspection.