Tutorial: Enhancing Java with Spoon
Renaud Pawlak
Rensselaer Polytechnic Institute, Hartford Campus
275 Windsor St, Hartford, CT 06120
Carlos Noguera and Nicolas Petitprez
INRIA Futurs
LIFL (UMR 8022) - Universite Lille 1
59655 Villeneuve d'Ascq Cedex France
Abstract:
Have you ever thought that the Java compiler could check more than what it does now? Have
you ever thought a lot of code needs to be written and maintained manually while it could be
automatically generated or validated by the compiler? Spoon is a framework that allows you
to enhance the Java semantics through static analysis and generative programming. With
Spoon, you can write compilation components called “Spoonlets”, which can be deployed in
Eclipse using the SpoonJDT plugin. Spoonlets can provide generic validations or
transformations, which are not provided from scratch by the compiler, such as the ones
provided by Findbugs project (http://findbugs.sourceforge.net/). Spoonlets can also
implement validations and transformations to support your favorite frameworks (SAX, Struts,
Hibernate ...) in order to simplify their use and avoid common mistakes. In this tutorial, we
learn how to use and create new Spoonlets, which will help to dramatically increase the
quality of your own Java developments, but also the developments of the programmers
working with you.
Table of contents
1 Getting Started with Spoon ............................................................. ...
Voir