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.
Year
DOI
Venue
2008
10.5381/jot.2008.7.2.a1
JOURNAL OF OBJECT TECHNOLOGY
Field
DocType
Volume
Programming language,Software engineering,Computer science,Java
Journal
7
Issue
ISSN
Citations 
2
1660-1769
4
PageRank 
References 
Authors
0.40
11
3
Name
Order
Citations
PageRank
Lorenzo Bettini187151.50
Sara Capecchi214412.52
Elena Giachino323215.54