The Artima Developer Community
Sponsored Link

Articles Forum
The Java Compiler API

2 replies on 1 page. Most recent reply: Apr 6, 2007 8:38 PM by Mark Weiss

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

The Java Compiler API Posted: Apr 4, 2007 2:00 AM
Reply to this message Reply
Advertisement
In this interview, Peter von der Ahé explains how the JSR 199 Compiler API opens the Java compiler up to a new class of developer tools that know a lot more about the code being edited. What sorts of features would you like to see in IDEs that can be made possible by the Compiler API?

http://www.artima.com/lejava/articles/compiler_api.html


Chris Adamson

Posts: 4
Nickname: invalidnam
Registered: Jan, 2007

Re: The Java Compiler API Posted: Apr 5, 2007 7:47 AM
Reply to this message Reply
I've just started working with the compiler API for an AB5k desklet. It's a lot more than I need, but looking at the API, it's clear that they've anticipated some pretty elaborate uses and provide a significant amount of flexibility for those who are able and willing to take advantage of it. I'm not terribly satisfied with the documentation, though -- creating a compilation task takes an "options" parameter that I have yet to find documentation of.

Mark Weiss

Posts: 1
Nickname: marksw
Registered: Apr, 2007

Re: The Java Compiler API Posted: Apr 6, 2007 8:38 PM
Reply to this message Reply
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.

Flat View: This topic has 2 replies on 1 page
Topic: Comparing Two High-Performance I/O Design Patterns Previous Topic   Next Topic Topic: A Framework for Swing

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use