Generic Wrappers

  • Authors:
  • Martin Büchi;Wolfgang Weck

  • Affiliations:
  • -;-

  • Venue:
  • ECOOP '00 Proceedings of the 14th European Conference on Object-Oriented Programming
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Component software means reuse and separate marketing of premanufactured binary components. This requires components from different vendors to be composed very late, possibly by end users at run time as in compound-document frameworks. To this aim, we propose generic wrappers, a new language construct for strongly-typed class-based languages. With generic wrappers, objects can be aggregated at run time. The aggregate belongs to a subtype of the actual type of the wrapped object. A lower bound for the type of the wrapped object is fixed at compile time. Generic wrappers are type safe and support modular reasoning. This feature combination is required for true component software but not achieved by known wrapping and combination techniques, such as the wrapper pattern or mix-ins. We analyze the design space for generic wrappers, e.g. overriding, forwarding vs. delegation, and snappy binding of the wrapped object. As a proof of concept, we add generic wrappers to Java and report on a mechanized type soundness proof of the latter.