Simulating multiple inheritance in Java

Citation
E. Tempero et R. Biddle, Simulating multiple inheritance in Java, J SYST SOFT, 55(1), 2000, pp. 87-100
Citations number
12
Categorie Soggetti
Computer Science & Engineering
Journal title
JOURNAL OF SYSTEMS AND SOFTWARE
ISSN journal
01641212 → ACNP
Volume
55
Issue
1
Year of publication
2000
Pages
87 - 100
Database
ISI
SICI code
0164-1212(200012)55:1<87:SMIIJ>2.0.ZU;2-Y
Abstract
Multiple inheritance is a feature whose worth has been vigorously debated, and even now there is no agreement as to whether a language should include it. Java does not have multiple inheritance, but its designers claim that m any of the benefits of multiple inheritance can be gained through the use o f a new feature, the interface. In this paper we explore the claims of the Java designers, and show how the interface may be used to simulate multiple inheritance. We first discuss the benefits of inheritance and multiple inh eritance, and then demonstrate how the need for them arises in program deve lopment, using an extended example based on a real application. We then pre sent the technique for simulating multiple inheritance, showing how it allo ws the main benefits of multiple inheritance to be achieved in Java. Finall y, we discuss the limitations of the approach. In particular, we show how t he approach faces difficulties when used with class libraries, such as the Java Core API, and we suggest a convention for Java class library designers that will mitigate this problem. (C) 2000 Elsevier Science Inc. All rights reserved.