Bettini-Capecchi-Giachino:JOT-08 (Article)
|
Author(s) | Lorenzo Bettini, Sara Capecchi and Elena Giachino |
Title | « Featherweight Wrap Java: wrapping objects and methods » |
Journal | Journal of Objetc Technology (www.jot.fm) |
Volume | 7 |
Number | 2 |
Page(s) | 5-29 |
Year | 2008 |
Note | Special Issue OOPS Track at SAC 2007 |
Abstract |
We present a language extension, which integrates in a Java like language a mechanism for dynamically extending object behaviors without changing their type. Our approach consists in moving the addition of new features from class (static) level to object (dynamic) level: the basic features of entities (representing their structure) are separated from the additional ones (wrapper classes whose instances represent run-time added behaviors). At run-time, these entities can be dynamically composed by instantiating wrapper objects which are attached to basic entities. Wrappers permit specializing (wrapping) methods at run-time: the method of the wrapper will be automatically executed after the method of the wrapped objects, using a delegation mechanism. Furthermore, wrapped methods can return values and values returned by the wrapped methods are transparently made available in the wrapper methods. We formalize our extension by adding the new constructs to Featherweight Java and we prove that the core language so extended (Featherweight Wrap Java) is type safe. |
@article{Bettini-Capecchi-Giachino:JOT-08,
number = {2},
volume = {7},
author = {Bettini, Lorenzo and Capecchi, Sara and Giachino, Elena },
note = {Special Issue OOPS Track at SAC 2007},
title = {{Featherweight Wrap Java: wrapping objects and methods}},
abstract = {We present a language extension, which integrates in a Java like
language a mechanism for dynamically extending object behaviors
without changing their type. Our approach consists in moving the
addition of new features from class (static) level to object
(dynamic) level: the basic features of entities (representing
their structure) are separated from the additional ones (wrapper
classes whose instances represent run-time added behaviors). At
run-time, these entities can be dynamically composed by
instantiating wrapper objects which are attached to basic
entities. Wrappers permit specializing (wrapping) methods at
run-time: the method of the wrapper will be automatically executed
after the method of the wrapped objects, using a delegation
mechanism. Furthermore, wrapped methods can return values and
values returned by the wrapped methods are transparently made
available in the wrapper methods. We formalize our extension by
adding the new constructs to Featherweight Java and we prove that
the core language so extended (Featherweight Wrap Java) is type
safe. },
journal = {Journal of Objetc Technology (www.jot.fm)},
year = {2008},
months = {February},
pages = {5-29},
}
This document was generated by bib2html 3.3.
(Modified by Luca Paolini, under the GNU General Public License)
