Rava: designing a Java extension with dynamic object roles
Chengwan He, Zhijie Nie, Bifeng Li, Lianlian Cao, Keqing He · 2006
Dynamic object roles are widely considered to be helpful to conceptual modeling of application. This paper presents an approach to role implementation based on mediator pattern, which is used to object behavior extension in class-based language. We present a prototypical implementation of the approach by extending the Java language, called Rava. In the approach, role management (generation of role object, dynamic binding of core object and role etc.) is implemented by mediator object, which reduces complexity of client program. At the same time, the binding relationship between core object and role is also saved in mediator object, which reduces the coupling between core object and role and is helpful to improving their reusability. We have developed a Rava to Java translator which makes Rava sources executable on every Java virtual machine. Our Approach can also be used to extend other class-based language.