Skip to main content

Wrappers to the rescue

  • Conference paper
  • First Online:
ECOOP’98 — Object-Oriented Programming (ECOOP 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1445))

Included in the following conference series:

Abstract

Wrappers are mechanisms for introducing new behavior that is executed before and/or after, and perhaps even in lieu of, an existing method. This paper examines several ways to implement wrappers in Smalltalk, and compares their performance. Smalltalk programmers often use Smalltalk's lookup failure mechanism to customize method lookup. Our focus is different. Rather than changing the method lookup process, we modify the method objects that the lookup process returns. We call these objects method wrappers. We have used method wrappers to construct several program analysis tools: a coverage tool, a class collaboration tool, and an interaction diagramming tool. We also show how we used method wrappers to construct several extensions to Smalltalk: synchronized methods, assertions, and multimethods. Wrappers are relatively easy to build in Smalltalk because it was designed with reflective facilities that allow programmers to intervene in the lookup process. Other languages differ in the degree to which they can accommodate change. Our experience testifies to the value, power, and utility of openness.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Kent Beck. Using demand loading. The Smalltalk Report, 4(4): 19–23, January 1995.

    Google Scholar 

  2. John K. Bennett. The design and implementation of distributed Smalltalk. In Proceedings OOPSLA '87, pages 318–330, December 1987. Published as ACM SIGPLAN Notices, volume 22, number 12.

    Article  Google Scholar 

  3. Heinz-Dieter Böcker and Jürgen Herczeg, What Tracers are Made Of, ECOOP/OOPSLA '90 Conference Proceedings, SIGPLAN Notices, Volume 25, Number 10, October 1990

    Google Scholar 

  4. Dan G. Bobrow, Linda G. DeMichiel, Richard P. Gabriel, Sonya E. Keene, Gregor Kiczales, and David A. Moon. Common lisp object system specification. SIGPLAN Notices, 23, September 1988.

    Google Scholar 

  5. Daniel G. Bobrow and Mark Stefik. The LOOPS Manual. Xerox PARC, 1983.

    Google Scholar 

  6. Kraig Brockschmidt. Inside OLE, second edition, Microsoft Press, Redmond, Washington, 1995.

    Google Scholar 

  7. Manuela Carrillo-Castellon, Jesus Garcia-Molina, and Ernesto Pimentel. Eiffel-like assertions and private methods in Smalltalk. In TOOLS 13, pages 467–478, 1994.

    Google Scholar 

  8. Pierre Cointe, The Classtalk System: a Laboratory to Study Reflection in Smalltalk, OOPSLA/ECOOP '90 Workshop on Reflection and Metalevel Architectures in Object-Oriented Programming, Mamdouh Ibrahim, organizer.

    Google Scholar 

  9. Margaret A. Ellis and Bjarne Stroustrup. The Annotated C++ Reference Manual. Addison-Wesley, Reading, Massachusetts, 1990.

    Google Scholar 

  10. Brian Foote and Ralph E. Johnson. Reflective facilities in Smalltalk-80. In Proceedings OOPSLA '89, pages 327–336, October 1989. Published as ACM SIGPLAN Notices, volume 24, number 10.

    Article  Google Scholar 

  11. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley, 1995.

    Google Scholar 

  12. B. Garbinato, R. Guerraoui, and K. Mazoui. Implementation of the GARF Replicated Objects Platform. In Distributed Systems Engineering Journal, (2), 1995, 14–27.

    Article  Google Scholar 

  13. James Gosling, Bill Joy, and Guy Steele, The Java Language Specification, Addison-Wesley, 1996.

    Google Scholar 

  14. R. Guerraoui, B. Garbinato, and K. Mazouni. The GARF System. In IEEE Concurrency, 5(4), 1997.

    Google Scholar 

  15. Bob Hinkle and Ralph E. Johnson. Taking exception to Smalltalk. The Smalltalk Report, 2(3), November 1992.

    Google Scholar 

  16. Bob Hinkle, Vicki Jones, and Ralph E. Johnson. Debugging objects. The Smalltalk Report, 2(9), July 1993.

    Google Scholar 

  17. Daniel H. H. Ingalls, The Evolution of the Smalltalk-80 Virtual Machine, in Smalltalk-80, Bits of History, Words of Advice, Glenn Krasner, editor, Addision-Wesley, Reading, MA, 1983

    Google Scholar 

  18. Gregor Kiczales, Jim des Rivieres, and Daniel G. Bobrow, The Art of the Metaobject Protocol, MIT Press, 1991.

    Google Scholar 

  19. Gregor Kiczales and John Lamping, Issues in the Design and Implementation of Class Libraries, OOPSLA '92, Vancouver, BC, SIGPLAN Notices Volume 27, Number 10, October 1992.

    Google Scholar 

  20. Bent Bruun Kristensen, Ole Lehrmann Madsen, Birger Moller-Pedersen, and Kristen Nygaard, Object-Oriented Programming in the Beta Language, 8 October, 1990.

    Google Scholar 

  21. Wilf R. LaLonde and Mark Van Gulik. Building a backtracking facility in Smalltalk without kernel support. In Proceedings OOPSLA '88, pages 105–122, November 1988. Published as ACM SIGPLAN Notices, volume 23, number 11.

    Article  Google Scholar 

  22. Danny B. Lange and Yuichi Nakamura, Interactive Visualization of Design Patterns Can Help in Framework Understanding, In Proceedings of OOPSLA '95, pages 342–357, October 1995, Published as ACM SIGPLAN Notices, volume 30, number 10

    Article  Google Scholar 

  23. Paul L. McCullough. Transparent forwarding: First steps. In Proceedings OOPSLA '87, pages 331–341, December 1987. Published as ACM SIGNPLAN Notices, volume 22, number 12.

    Article  Google Scholar 

  24. Steven L. Messick and Kent L. Beck. Active variables in Smalltalk-80. Technical Report CR-85-09, Computer Research Lab, Tektronix, Inc., 1985.

    Google Scholar 

  25. Bertrand Meyer. Eiffel: The Language. Prentice-Hall, 1992.

    Google Scholar 

  26. Geoffrey A. Pascoe. Encapsulators: A new software paradigm in Smalltalk-80. In Proceedings OOPSLA '86, pages 341–346, November 1986. Published as ACM SIGPLAN Notices, volume 21, number 11.

    Article  Google Scholar 

  27. Fred Rivard. Smalltalk: a reflective language. In Proceedings Reflection '96.

    Google Scholar 

  28. Bjarne Stroustrop. The Design and Evolution of C++. Addison-Wesley, Reading, MA 1994.

    Google Scholar 

  29. Michael D. Tiemann. Solving the RPC problem in GNU C++. In 1988 USENIX C++ Conference, pages 17–21, 1988.

    Google Scholar 

  30. D. Weinreb, and D. Moon. Lisp Machine Manual, Symbolics, 1981.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Eric Jul

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Brant, J., Foote, B., Johnson, R.E., Roberts, D. (1998). Wrappers to the rescue. In: Jul, E. (eds) ECOOP’98 — Object-Oriented Programming. ECOOP 1998. Lecture Notes in Computer Science, vol 1445. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0054101

Download citation

  • DOI: https://doi.org/10.1007/BFb0054101

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-64737-9

  • Online ISBN: 978-3-540-69064-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics