users@jaxb.java.net

Re: ArrayField and ConstField not public classes

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 10 Mar 2009 12:15:11 +0100

Hi.

> Hi these field classes are not public and are final why?

Because these are implementation details.

> The others in the package are public and not final. This stuff is handy when
> writing plugins to add new methods to generated classes. I can of course use
> the cut and paste method of inheritance, but a bit of consistency here would
> be an improvement.

See my other response - you don't have to extend these classes to add
new methods. All you need is a class outline and a field outline. See
classOutline.ref, it is JDefinedClass, you can easily declare new
methods there. Class outline contains a number of field outlines -
these are the rendered properties. Just iterate over them and generate
new methods in the classOutline.ref of the parent class outline.

Bye.
/lexi