dev@jaxb.java.net

Re: Modifying methods in an xjc plugin

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 25 Jan 2007 14:42:31 -0800

Gregory Kick wrote:
> I'd like to modify the getters for any field that implements List.
> Specifically, i'd like to replace the List implementation with my own.
> Is there a way to do that? I can only find methods for adding new
> statements, instead of modifying them...

Right. Modifying things that are already written is somewhat limited
because XJC never needed it. We can certainly add them.

But in your case, you might be better off to touch the Model object and
set FieldRenderer to relevant CPropertyInfo.realization. See
CollectionTypeAttribute.java line 39 to how to create a list
FieldRenderer for custom collection type.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com