2

I want to collect which methods can be safely pushed down from a superclass to a subclass, specifically, when you have only one subclass and there is no reason to maintain the method in the superclass.

It could be a matter of dinamically discover these methods (during execution) to check which ones are executed in a superclass AND they could be pushed down given that there is only one subclass? Someone had done this? Is there a tool maybe?

user869097
  • 1,362
  • 8
  • 16

1 Answers1

1

The refactoring engine contains various code critics rules that detect situations that can be caused by the problem you describe, e.g. "Variables not referenced", "Utility methods", "References an abstract class", "Class not referenced", ...

The refactoring engine can of course also push down the detected methods, and delete an unused class from within a hierarchy.

Lukas Renggli
  • 8,754
  • 23
  • 46