Spoon is a Java program processor that fully supports Java 5. It provides a complete and fine-grained Java metamodel where any program element (classes, methods, fields, statements, expressions, etc.) can be accessed both for reading and modification. It can be used for validation purposes, to ensure that your programs respect some programming conventions or guidelines, or for program transformation, by using a pure Java template engine. It provides an Eclipse plugin (SpoonJDT) that allows for tight integration of Spoon within the Eclipse environment. With SpoonJDT, a set of validations and transformations packaged as a Spoonlet can occur on the fly, and the reports are well-integrated into the Eclipse JDT.

Changes

This release fixes a bug that prevented new classes from being generated with the substitution API. It has migrated to Eclipse 3.3 (generics warnings have been fixed). In substitution, the default implicit constructor is ignored. Null type on string literals concatenation has been fixed. A line number issue in Javadoc comments has been fixed. A getReferencedTypes method has been added to CtElement. Import in compilation units has been added. A spoon.reflect.cu package has been added for compilation units and related classes. Incorrect import in CtTypeReferenceImpl has been fixed. There is support for template inheritance.

URL: Spoon: Program Processing, Analysis, and Transformation in Java