Sciweavers

ECOOP
1998
Springer

Wrappers to the Rescue

14 years 3 months ago
Wrappers to the Rescue
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 th...
John Brant, Brian Foote, Ralph E. Johnson, Don Rob
Added 05 Aug 2010
Updated 05 Aug 2010
Type Conference
Year 1998
Where ECOOP
Authors John Brant, Brian Foote, Ralph E. Johnson, Don Roberts
Comments (0)