PolyJ – Java with Parameterized Types is a portable compiler that accepts an extended version of the Java language. The PolyJ language includes support for generic programming in the form of parameterized types. Like some other proposals for adding genericity to Java, PolyJ provides constrained parametric polymorphism. Unlike some, it uses the constraint mechanism of where clauses, which is important because it provides flexibility when composing a program. PolyJ also allows all types to be used as parameters, even basic types like int. A powerful feature of PolyJ is that instantiation types and parameter types are first-class types that may be used wherever a type may be used — particularly, in safe run-time casts and with “instanceof”.
The language Jass (‘Java with assertions’) is an extension of Java by assertions. This concept is taken from Eiffel. It has been developed by Bertrand Meyer as part of the concept “design by contract” in order to develop correct software. For this purpose the assertions are checked during runtime. If they are violated, exceptions are triggered which can themselves be handled in the program.
Poor Man’s Genericity for Java is an implementation of parameterized classes (constrained parametric polymorphism) for Java. It is based on a “lowest common denominator” design that can be implemented easily on top of any existing Java compiler. We have implemented a fully working compiler that has been built by reusing Sun’s Java compiler almost without modifications: only the way in which source and byte-code files are loaded was changed to perform simple transformations on loaded files.
GJ is an extension of the Java programming language that supports generic types. GJ compiles into JVM code, so GJ programs run on any Java platform, including Java compliant browsers. Class files produced by the GJ compiler can be freely mixed with those produced by other Java compilers.