Interfaces with default implementations in Java

  • Authors:
  • Markus Mohnen

  • Affiliations:
  • Lehrstuhl für Informatik II, RWTH Aachen, Germany

  • Venue:
  • PPPJ '02/IRE '02 Proceedings of the inaugural conference on the Principles and Practice of programming, 2002 and Proceedings of the second workshop on Intermediate representation engineering for virtual machines, 2002
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

With the interface construct, Java features a concept with high potential for producing reusable code: Java's interfaces allow the definition of class properties independently of class inheritance. We propose an extension of Java for providing default implementations in interfaces. Default implementations are useful since they reduce the effort required to implement an interface. They are especially interesting if there is a canonical way to implement methods of the interface in terms of some other methods. In these cases, an implementation can be obtained by implementing the base methods and use the default implementations of the other methods.