This work discusses the following two aspects of Java: (1) the implications of Java's lack of templates/generics and multiple inheritance of classes on software construction, and techniques to mitigate its effect; and (2) the influence of design patterns work on Java language and its APIs. Design patterns are a description of communicating objects and classes that are customized to solve a general design problem in a particular context [17,5,34]. Design patterns consolidate design experience that can potentially be reused in tackling a variety of problems, and in organizing and analyzing potential solutions to the problem. Many of these patterns improve software reuse and facilitate code evolution. Furthermore, the catalog of design patterns provides a rich vocabulary for documenting and sharing design decisions.
Idioms, on the other hand, are low-level ``patterns'' that describe how to solve implementation-specific problems in a programming language. Idioms demonstrate competent use of programming language features [5].
Java does not support generics and multiple inheritance of classes, thereby
simplifying the language and its implementation. Section
reviews
problems associated with support for multiple inheritance in existing
object-oriented languages. Sections
and
analyze idiomatic approximations to these features in Java
using only single inheritance of classes and multiple inheritance of
interfaces. Section
presents Java APIs from patterns
perspective. In particular, design patterns embodied by various packages
in Java are documented so as to enable using existing literature on
patterns to elucidate the pros and the cons of the design decisions.
This section is intentionally brief and defers details to the
seminal work of [17] and the recent independent work
of [11,13,19]. A lot of related material is also
available on-line starting at the URL
http://www.objenv.com/cetus/software.html among others.
In other words, this paper explores:
The overall objective of this paper is to consolidate a software engineering perspective on the Java language and the accompanying libraries. This comprehensive overview of Java underscores the fact that Java designers have included only tried and time-tested ideas in the language. The latter part of the paper complements prior work on the general theme of ``Design Patterns and Java'' described in [11,13,23,19,14,16], etc.