Screwing around with GJ.

C. Scott Ananian


I've been playing with the various prototype compilers that Sun has been releasing as part of its "Extending the Java Programming Language with Generic Types" project (JSR-14). I've been programming with JSR-14 for about two years now, since the early 1.0 prototypes. In November Sun released version 1.3 of the prototype compiler. This page has been updated accordingly.

This page is a place to collect my various work on GJ-related things, including updated javadoc for the current 1.3 prototype compiler, SinjP, a javap tool that works on JSR-14 class files, SinjDoc, a javadoc tool that works on JSR-14 source files, a LALR(1) grammar for JSR-14 (see also Eric Blake's work), and a a list of bugs I've found in the 1.3 prototype. The current prototypes are *almost* but still-not-quite able to compile FLEX; I'll probably keep hacking on things until the GJ compiler is bug-free and usable enough to let me get Real Work Done on FLEX.

If you're interested in JSR-14, you may also be interested in JSR-201, which includes enumerations, autoboxing, for loop enhancements, and import of static members. Also proposed for Java 1.5 are JSR-133 (revisions to the java memory model and threads) and JSR-181 (a metadata facility).

I (and others) have also written a package of parameterized collections classes which greatly extend the power of the standard java.util library. This library was originally developed for the FLEX project.


SinjDoc: a Javadoc-like tool for JSR-14

This is still in active development. You can download the current version 0.3 sources; caveat emptor. API documentation (no frames version) generated by the tool is also available, as is a list of changes made since the last release.

Sign up on the SinjDoc-Announce mailing list to be notified of new releases of SinjDoc.

For a good example of what this tool can do, look at the generated documentation for the FLEX compiler infrastructure, which is generated using it.


SinjP: a Javap-like tool for JSR-14

I've written a no-frills javap-like tool that a) doesn't choke on bytecode emitted by the JSR-14 compiler, as does the standard Sun javap, and b) actually parses the JSR-14 Signature attribute to emit the correct parameterized signature for the methods in the class. This was invaluable to be in looking through the jar files supplied with the prototype compilers to look for what had changed. Maybe it will be helpful to you, too. I've updated it to support the new signature format of the 1.2-and-later prototypes.

To use:


Updated javadoc for standard libraries

The 1.2 prototype compiler updated the "generic"-ified Collections (and other?) APIs, but did not come with updated javadoc. As a result, your existing code which extends Collections tends to mysteriously fail because your type signatures no longer match properly. (It didn't help that the prototype compiler used to crash hard for some of these mismatches.) So --- to ease your pain, I've gone through the javadoc with the help of my javap-like tool below and manually tried to fixup the javadoc to be accurate. Note that this is accurate to what's shipping now with the 1.3 prototype; note my list below for details on what I think may be "broken" in this release and thus slated for change in future releases.

So, without further ado, here are some links to the goodies:


Bug list for 1.3 prototype compiler

Old bug list for 1.2 prototype compiler.

Here are the bugs I know about or suspect are in the 1.3 prototype compiler. Note that these may or may not have been confirmed by the good folk at Sun, so some of these might actually be "features" in disguise.


C. Scott Ananian
cscott cscott.net

Valid XHTML 1.0!