Mark Weiss
Posts: 1
Nickname: marksw
Registered: Apr, 2007
|
|
Re: The Java Compiler API
|
Posted: Apr 6, 2007 8:38 PM
|
|
Could this API be used to create a dynamic extension to a running Java application, so that a module receives a block of code and generates a new class, which is then available to the running application? I'm thinking of an eval idea -- the ability to extend dynamically running Java applications. For example, by wrapping the above functionality, you could support something like Ruby's ability to dynamically extend a class -- a module could receive a class file and method code to be added (for example), combine them, and pass them to the API to parse and generate a new class. Then the newly created extended class is available in the same process.
|
|