A Generic Java Language Extension
DistributionCurrent compiler version: 0.6m
Download GJ for your platform
Documentation for the following is available below.
Mailing listsThere are two mailing lists, which are also used for Pizza: a low-volume list for announcements, and a list for public discussion of the compiler and language. Past mailings are kept in an archive.
GJ collection library
The distribution includes a generic version of the Java Collection Library.
The distribution also includes some utility classes, in the package gj.util.
The GJ compiler
The GJ compiler gjc can be used as a drop-in replacement for javac. Like javac, but unlike the Pizza compiler, gjc also supports dynamic compilation of library classes.
The gjc command takes options followed by any number of file names, which must have a .java extension.
gjc (options) file_1.java ... file_n.javaThe following options are supported:
The options -depend and -O that are supported by javac are presently not recognized by gjc.
The GJ retrofitter
The GJ retrofitter allows one to attach generic types to prexisting class files. It can in this way retro-actively parameterize classes and their methods which have been written in the conventional Java language. The retrofitter is invoked by setting a special option of the gjc compiler:
gjc -retrofit <pathname> file(s).javaThis will compile the given source file(s) in the usual way, but without generating any code. The only other difference between retrofit mode and normal mode is that in retrofit mode method bodies can be omitted.
The retrofitter will then search for classes with the same fully qualified names as those that were compiled, using the <pathname> argument to -retrofit as class path. The tool will check that the erasure of all generic signatures in the compiled classes match with signatures in the loaded classes. If this check succeeds, the loaded classes are augmented with additional attributes that describe their generic types and the augmented class files are written to disk. The usual compiler option -d for setting an output directory applies.
GJ documentation generation
The GJ compiler currently does not support HTML documentation generation in the style of javadoc. However, you can use the pizzadoc tool to generate HTML documents for GJ files as well. You'll need to have the Pizza compiler version 0.39e or later to do this, which is available for download.
Comments and bug reports to the Pizza Group, firstname.lastname@example.org. Java is a trademark of Sun Microsystems. All software and documents on the Pizza site are © Copyright 1996, 1997 by the respective authors as attributed on each. Terms for redistribution are available.