Mixin programming in Java with reflection and dynamic invocation

  • Authors:
  • T. J. Brown;I. Spence;P. Kilpatrick

  • Affiliations:
  • The Queen's University of Belfast, Belfast, N. Ireland;The Queen's University of Belfast, Belfast, N. Ireland;The Queen's University of Belfast, Belfast, N. Ireland.

  • 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

The concept of mixin programming has emerged as an important implementation technique in the context ol software reuse and software productivity. In mixin based programming classes are defined which support particular roles or capabilities, which may require to be attached to a number of other classes. Mixin classes can be composed dynamically so that composite objects with differing combinations of roles and capabilities may be created without redundancy. Implementing the mixin concept in C++ is straightforward, using the parameterized inheritance capabilities provided by C++ templates. In standard Java it is not possible to use this approach because Java does not currently provide templates. But the Java language has other powerfull facilities, of which one is reflection. In this paper we outline an approach to mixin programming in Java, which is subject to ongoing development and which is based on exploiting Java's reflection capabilities.