Object reuse and behavior adaptation in Java-like languages

  • Authors:
  • Lorenzo Bettini;Betti Venneri

  • Affiliations:
  • Università di Torino, Corso Svizzera, Torino, Italy;Università di Firenze, Viale Morgagni, Firenze, Italy

  • Venue:
  • Proceedings of the 9th International Conference on Principles and Practice of Programming in Java
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Inheritance, which is a basic mechanism in mainstream object-oriented languages, introduces a strong coupling which limits modularity and code reuse. Furthermore, static class hierarchies cannot easily deal with unpredictable dynamic adaptations of the object behavior. In order to overcome these limitations, we propose new linguistic constructs for composing objects in a Java-like language. Objects are intended as featherweight components which can be used in multiple compositions, and object types specify not only the implemented functionalities, but also the required methods, which will be provided by other components during composition. Thus the language supports flexible object reuse and adaptation of the object behavior at run time. The static type discipline guarantees that method calls on well-typed object compositions are safe.