ABSTRACT
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. We argue that both these benefits improve software modularity, and discuss our 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.
- D. Bäumer, E. Gamma, and A. Kiezun. Integrating refactoring support into a Java development tool. In Object-Oriented Programming, Systems, Languages, and Applications, 2001.Google Scholar
- J. Bloch. Effective Java. Prentice Hall, 2008.Google Scholar
- A. De Lucia, G. Di Lucca, A. Fasolino, P. Guerra, and S. Petruzzelli. Migrating legacy systems towards object-oriented platforms. In Int. Conf. Software Maintenance, 1997. Google ScholarDigital Library
- D. Dig, J. Marrero, and M. D. Ernst. Refactoring sequential java code for concurrency via concurrent libraries. In Int. Conf. Software Engineering, 2009. Google ScholarDigital Library
- A. Donovan, A. Kie˙zun, M. S. Tschantz, and M. D. Ernst. Converting Java programs to use generic libraries. In Object-Oriented Programming, Systems, Languages, and Applications, 2004. Google ScholarDigital Library
- R. Fuhrer, F. Tip, A. Kie˙zun, J. Dolby, and M. Keller. Efficiently refactoring Java applications to use generic libraries. In European Conference on Object-Oriented Programming, 2005. Google ScholarDigital Library
- X. Ge and E. Murphy-Hill. Manual refactoring changes with automated refactoring validation. In Int. Conf. Software Engineering, 2014. Google ScholarDigital Library
- C. S. Horstmann. Java SE 8 for the Really Impatient. Addison-Wesley Professional, 2014. Google ScholarDigital Library
- H. Kegel and F. Steimann. Systematically refactoring inheritance to delegation in Java. In Int. Conf. Software Engineering, 2008. Google ScholarDigital Library
- R. Khatchadourian, J. Sawin, and A. Rountev. Automated refactoring of legacy Java software to enumerated types. In Int. Conf. Software Maintenance, 2007.Google ScholarCross Ref
- A. Kie˙zun, M. D. Ernst, F. Tip, and R. M. Fuhrer. Refactoring for parameterizing Java classes. In Int. Conf. Software Engineering, 2007. Google ScholarDigital Library
- K. Kontogiannis, J. Martin, K. Wong, R. Gregory, H. Müller, and J. Mylopoulos. Code migration through transformations: an experience report. In Conference of the Centre for Advanced Studies on Collaborative Research, 1998. Google ScholarDigital Library
- A. Kumar, A. Sutton, and B. Stroustrup. Rejuvenating C++ programs through demacrofication. In Int. Conf. Software Maintenance, 2012. Google ScholarDigital Library
- Y.-W. Kwon and E. Tilevich. Cloud refactoring: automated transitioning to cloud-based services. Automated Software Engineering, 2014. Google ScholarDigital Library
- M. Mongiovi. Safira: A tool for evaluating behavior preservation. In Object-Oriented Programming, Systems, Languages, and Applications, 2011. Google ScholarDigital Library
- W. F. Opdyke. Refactoring object-oriented frameworks. PhD thesis, University of Illinois at Urbana-Champaign, 1992. Google ScholarDigital Library
- Oracle Corporation. Java TM platform, standard edition 8 api, 2016. URL http://docs.oracle.com/javase/8/docs/api.Google Scholar
- Oracle Corporation. Default methods, 2016. URL http://docs.oracle.com/javase/tutorial/java/IandI/ defaultmethods.html.Google Scholar
- G. Soares, R. Gheyi, and T. Massoni. Automated behavioral testing of refactoring engines. IEEE Transactions on Software Engineering, 2013. Google ScholarDigital Library
- W. Tansey and E. Tilevich. Annotation refactoring: inferring upgrade transformations for legacy applications. In Object-Oriented Programming, Systems, Languages, and Applications, 2008. Google ScholarDigital Library
- F. Tip, A. Kie˙zun, and D. Bäumer. Refactoring for generalization using type constraints. In Object-Oriented Programming, Systems, Languages, and Applications, 2003. Google ScholarDigital Library
- R. Vallée-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan. Soot-a java bytecode optimization framework. In Conference of the Centre for Advanced Studies on Collaborative Research, 1999. Google ScholarDigital Library
- D. von Dincklage and A. Diwan. Converting Java classes to use generics. In Object-Oriented Programming, Systems, Languages, and Applications, 2004. Google ScholarDigital Library
- Y. Zou and K. Kontogiannis. A framework for migrating procedural code to object-oriented platforms. Asia-Pacific Software Engineering Conference, 2001. Google ScholarDigital Library
- Introduction Approach Research Questions Methodology Conclusion & Future WorkGoogle Scholar
Index Terms
- Towards improving interface modularity in legacy Java software through automated refactoring
Recommendations
Automated refactoring of legacy Java software to default methods
ICSE '17: Proceedings of the 39th International Conference on Software EngineeringJava 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 ...
Evaluating the Java Native Interface JNI: Leveraging Existing Native Code, Libraries and Threads to a Running Java Virtual Machine
This article aims to explore JNI features and to discover fundamental operations of the Java programming language, such as arrays, objects, classes, threads and exception handling, and to illustrate these by using various algorithms and code samples. ...
Defaultification refactoring: a tool for automatically converting Java methods to default
ASE '17: Proceedings of the 32nd IEEE/ACM International Conference on Automated Software EngineeringEnabling 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, ...
Comments