Current area: HOME -> Java -> Code Generation Articles
Code Generation
CentiJ: An RMI Code Generator
The CentiJ system synthesizes Java source code that funnels invocations through an RMI (Remote Method Invocation) based transport layer for distributed computation. The technique generates bridge pattern code (i.e., interfaces and proxies) that automate the creation of virtual proxies for message forwarding. We examine the tradeoffs between bridge implementations based on manual static delegation, automatic static delegation, and dynamic proxy classes. Advantages of the CentiJ technique include improved performance, type safety, transparency, predictability, flexibility and reliability. We then look at various methods for solving the disambiguation problem that arises when delegates have conflicting method signatures. Disambiguation can be automatic, semi-automatic or manual. CentiJ can automatically create a class that alters the interface to the bridge (using the adapter pattern).
Reflective Architectures and Code Generation
Frequently, Web applications have big amounts of similar code,
embedded in server pages (jsp, asp, php, etc). Developing this
code is error prone, but we have 2 possible alternative
techniques to avoid the mentioned situation: code generation
and reflective architectures. In this article we are going to
describe, analyze and compare each one of these solutions.