Wednesday, November 16, 2005

Digesting the APT Mirror API

I've been trying to write a Jelly tag library that can be used to write templates for generated output and generated java source files with Sun's new annotation processing tool (APT). (See my submission to the jakarta-commons mail list.) It's going quite well, thanks to the smart people who architected Jelly.

It's also been educational for me to try to digest the APT Mirror API because I've had to learn more about the formal Java 5 language syntax definitions (e.g. generics, annotations, etc). Before today, I had no idea what erasure was, except that it was a concept introduced with generics. This tutorial helped explain a lot about generics and the terms used to describe the syntax structures like "formal type parameters" and "bounded wildcards," as well as terms like erasure. I once tried to use the new reflection API to attempt to reflect on a formal type parameter, but I found that I couldn't swallow it, and I had to back down in fear. Maybe I'll have another go.

So, back to finishing up the new Jelly tag libarary.... It should go a lot faster now that I have a better understanding of the API for which I'm providing an XML interface. I'm going to go through the XDoclet Template Language as a reference for what functions may be needed. I like XDoclet. I really do. But thank goodness I won't have to digest that awful template language syntax anymore!

0 Comments:

Post a Comment

<< Home