| | |
Summary: Reducing Code Replication in Delegation-based Java Programs 1
Chapter 1
REDUCING CODE REPLICATION IN
DELEGATION-BASED JAVA PROGRAMS
Martin Kuhlemann
School of Computer Science, University of Magdeburg,Germany
Christian K¨astner
School of Computer Science, University of Magdeburg,Germany
Sven Apel
Department of Informatics and Mathematics, University of Passau,Germany
Keywords: Java language, generative programming
Abstract
Interfaces and delegation are fundamental concepts in OO languages. Although
both concepts have been shown to be beneficial in software development, sometimes
their implementation is cumbersome. Both result in numbers of forwarding methods
or numbers of empty methods for respective classes. These trivial methods distract
the user from non-trivial methods the class comprises. This increases complexity and
decreases maintainability. In its current form, Java does not provide sufficient mech-
anisms to avoid this boilerplate code. Instead, all the methods that are empty or only
|