Expanders: Statically Scoped Object Adaptation for Java

The expander is a new object-oriented (OO) programming language construct designed to support object adaptation. Expanders allow existing classes to be noninvasively updated with new methods, fields, and superinterfaces. Each client can customize its view of a class by explicitly importing any number of expanders. This view then applies to all instances of that class, including objects passed to the client from other components. A form of expander overriding allows expanders to interact naturally with OO-style inheritance.

Project Members

Alessandro Warth
Milan Stanojevic
Todd Millstein


Statically Scoped Object Adaptation with Expanders   (OOPSLA 2006)
        Alessandro Warth, Milan Stanojevic, and Todd Millstein


The EJava language extends Java 1.5 with expanders. The EJava compiler is implemented as an extension in the Polyglot extensible compiler framework.

Download the May 2007 release!