Open Access. Powered by Scholars. Published by Universities.®

Physical Sciences and Mathematics Commons

Open Access. Powered by Scholars. Published by Universities.®

City University of New York (CUNY)

2017

Interfaces

Articles 1 - 2 of 2

Full-Text Articles in Physical Sciences and Mathematics

Defaultification Refactoring: A Tool For Automatically Converting Java Methods To Default, Raffi T. Khatchadourian, Hidehiko Masuhara Oct 2017

Defaultification Refactoring: A Tool For Automatically Converting Java Methods To Default, Raffi T. Khatchadourian, Hidehiko Masuhara

Publications and Research

Enabling interfaces to declare (instance) method implementations, Java 8 default methods can be used as a substitute for the ubiquitous skeletal implementation software design pattern. Performing this transformation on legacy software manually, though, may be non-trivial. The refactoring requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods. All of this is necessary to preserve type-correctness and confirm semantics preservation. We demonstrate an automated refactoring tool called Migrate Skeletal Implementation to Interface for transforming legacy Java code to use the new default construct. The …


Automated Refactoring Of Legacy Java Software To Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara Jan 2017

Automated Refactoring Of Legacy Java Software To Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara

Publications and Research

Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods as it requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods to preserve type-correctness and confirm semantics preservation. In this paper, we present an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software. The approach features an extensive …