A refactoring prototype plug-in for Eclipse that migrates Java skeletal implementations to enhanced interfaces.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
edu.cuny.citytech.defaultrefactoring.core
edu.cuny.citytech.defaultrefactoring.eval
edu.cuny.citytech.defaultrefactoring.feature
edu.cuny.citytech.defaultrefactoring.tests.report
edu.cuny.citytech.defaultrefactoring.tests
edu.cuny.citytech.defaultrefactoring.ui
edu.cuny.citytech.defaultrefactoring.updatesite
examples
.coveralls.yml
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE.txt
README.md
pom.xml

README.md

Migrate Skeletal Implementation to Interface Refactoring

Build Status Coverage Status GitHub license DOI

Screenshot

Screenshot

Demonstration

(click to view)

Video demo of refactoring tool

Introduction

The skeletal implementation pattern is a software design pattern consisting of defining an abstract class that provides a partial interface implementation. However, since Java allows only single class inheritance, if implementers decide to extend a skeletal implementation, they will not be allowed to extend any other class. Also, discovering the skeletal implementation may require a global analysis. Java 8 enhanced interfaces alleviate these problems by allowing interfaces to contain (default) method implementations, which implementers inherit. Java classes are then free to extend a different class, and a separate abstract class is no longer needed; developers considering implementing an interface need only examine the interface itself. Both of these benefits improve software modularity.

This prototype refactoring plug-in for Eclipse represents ongoing work in developing an automated refactoring tool that would assist developers in taking advantage of the enhanced interface feature for their legacy Java software.

Usage

Currently, the prototype refactoring works only via the package explorer and the outline views (see issues #2 and #65). You can either select a single method to migrate or select a class, package, or (multiple) projects. In the latter case, the tool will find methods in the enclosing item(s) that are eligible for migration.

Installation

A beta version of our tool is available via an Eclipse update site at: https://raw.githubusercontent.com/ponder-lab/Migrate-Skeletal-Implementation-to-Interface-Refactoring/master/edu.cuny.citytech.defaultrefactoring.updatesite. Please choose the latest version.

You may also install the tool via the Eclipse Marketplace by dragging this icon to your running Eclipse workspace: Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client.

Limitations

The research prototype refactoring is conservative. While tool should not produce any type-incorrect or semantic-inequivalent code, it may not refactor all code that may be safe to refactor.

Contributing

See the contribution guide.

Publications

Raffi Khatchadourian and Hidehiko Masuhara. Proactive empirical assessment of new language feature adoption via automated refactoring: The case of Java 8 default methods. In International Conference on the Art, Science, and Engineering of Programming, volume 2 of Programming '18, pages 6:1--6:30. AOSA, March 2018. [ bib | DOI | http ]

Raffi Khatchadourian and Hidehiko Masuhara. Defaultification refactoring: A tool for automatically converting Java methods to default. In International Conference on Automated Software Engineering, ASE '17, pages 984--989, Piscataway, NJ, USA, October 2017. ACM/IEEE, IEEE Press. [ bib | DOI | http ]

Raffi Khatchadourian and Hidehiko Masuhara. Automated refactoring of legacy Java software to default methods. In International Conference on Software Engineering, ICSE '17, pages 82--93, Piscataway, NJ, USA, May 2017. ACM/IEEE, IEEE Press. [ bib | DOI | http ]