Welcome!
To use the personalized features of this site, please log in or register.
If you have forgotten your username or password, we can help.
|
 |
Wrappers to the rescue
| |
|
John Brant1 , Brian Foote1 , Ralph E. Johnson1 and Donald Roberts1 
| (1) |
Department of Computer Science, University of Illinois at Urbana-Champaign, 61801 Urbana, IL |
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.
Fulltext Preview (Small, Large)
 References secured to subscribers.
|
|
|
|
|
|