Refactoring for generalization using type constraints
Frank Tip, Adam Kieżun, Dirk Bäumer · 2003
Refactoring is the process of applying behavior-preserving transformations (called "refactorings") in order to improve a program's design. Associated with a refactoring is a set of preconditions that must be satisfied to guarantee that program behavior is preserved, and a set of source code modifications. An important category of refactorings is concerned with generalization (e.g., Extract Interface for re-routing the access to a class via a newly created interface, and Pull Up Members for moving members into a superclass). For these refactorings, both the preconditions and the set of allowable source code modifications depend on interprocedural relationships between types of variables. We present an approach in which type constraints are used to verify the preconditions and to determine the allowable source code modifications for a number of generalization-related refactorings. This work is implemented in the standard distribution of Eclipse (see www.eclipse.org).
Cited by 125 works. doi:10.1145/949305.949308
Authors
References
- Design Patterns: Elements of Reusable Object-Oriented Software
- Extreme Programming Explained: Embrace Change
- The Java Language Specification
- Refactoring: Improving the Design of Existing Code
- Object-Oriented Software Construction
- Refactoring object-oriented frameworks
- Creating abstract superclasses by refactoring
- Improving the Design of Existing Code
- Java Language Specification, Second Edition: The Java Series
- Reengineering class hierarchies using concept analysis