Logo - Fakultät Illustration



The Infer Type refactoring and its use for interface-based programming

AutorInnen: Friedrich Steimann
Kategorie: Artikel in Zeitschriften
erschienen in: Journal of Object Technology 6:2 (2007) 67–89
Abstract: Interface-based programming, i.e. the systematic use of interface types in variable declarations, serves the decoupling of classes and increases a program's changeability. To maximize this effect, interfaces should contain as few elements as possible. For the design of minimal (i.e., maximally general) interfaces, an in-depth analysis of the protocol needed from objects in a given context is required. However, currently available refactorings for the creation of such interfaces (such as Extract Interface) leave programmers alone with the decision what to include or, more importantly, what to omit: they let them choose manually from the protocol of a class, and only then offer the use of the new interface where (if) possible. To end this trial and error process, we have developed a new refactoring named Infer Type that, using type inference, completely automates the construction of new, context-specific interfaces and their use in variable declarations, thus supporting greater decoupling and access protection of code, serving the goals of interface-based programming.
Download: PDF
06.05.2008 12:49
FernUni-Logo FernUniversität in Hagen, Fakultät für Mathematik und Informatik, Lehrgebiet Programmiersysteme, 58084 Hagen, Tel.: +49 2331 987-2998