Skip to content

Latest commit

 

History

History
69 lines (44 loc) · 6.24 KB

File metadata and controls

69 lines (44 loc) · 6.24 KB

Migrate Skeletal Implementation to Interface Refactoring

Build Status Coverage Status GitHub license DOI Java profiler

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 ]

Citation

Please cite this work as follows:

@inproceedings{Khatchadourian2017b,
  author = {Khatchadourian, Raffi and Masuhara, Hidehiko},
  title = {Defaultification Refactoring: A Tool for Automatically Converting {Java} Methods to Default},
  booktitle = {International Conference on Automated Software Engineering},
  year = {2017},
  series = {ASE '17},
  pages = {984--989},
  address = {Piscataway, NJ, USA},
  month = oct,
  organization = {ACM/IEEE},
  publisher = {IEEE Press},
  isbn = {978-1-5386-2684-9},
  acmid = {3155691},
  doi = {10.1109/ASE.2017.8115716},
  location = {Urbana-Champaign, IL, USA},
  numpages = {6},
}