dev@jaxb2-commons.java.net

Some questions about a new plugin

From: Igor Stroh <igor_at_rulim.de>
Date: Wed, 14 Feb 2007 11:41:39 +0100

Hi there,

I hope I've chosen the right list for my questions, if not - please
redirect me to a more appropriate location :)

I'd like to try to implement a new plugin for xjc compiler, which would
annotate the generated class methods with values from <xs:restriction />.
Things like maxLength, minLength or patterns for xs:string derived types
will suffice for the moment.

My problem is now, that I have no idea where to start - I've had a look
at already existing plugins (so a basic skeleton class is quite easy to create),
but IIRC none of them does anything with annotations.

Basically, my goals are:
1) Create some simple annotations for mutators[1] and copy them to the target
   directory where the generated sources are stored.

2) Find the restrictions for a type and add appropriate annotations to setter
   methods.

Any hints are greatly appreciated :)

TIA,
Igor

[1]: S.th. like the annotations described in section "JavaBeans Version" of
     http://java.sun.com/developer/technicalArticles/J2SE/constraints/annotations.html