dev@jaxb2-commons.java.net

Re: Re-Post: Finer grained controll over the code model.

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 19 Dec 2006 15:17:31 -0800

Julio.A.Mistral_at_wellsfargo.com wrote:
> Hi,
>
> I'm new to XJC plugin development and so I'm unsure about what I've been
> doing is the correct way to go. Basically, I've been adding the
> following methods to sun.codemodel classes to have finer control over
> the generated classes:
>
> JPackage
> 1. public void add( JDefinedClass class ): Adds the provided class to
> the package

You are supposed to create JDefinedClass by calling JPackage._class.

Why do you want to move it around after it's created?

> 3. public JMethod removeMethod(String name, JType[] params): Removes
> the method from the classes method list and returns a reference of the
> removed method, or null if the method doesn't exist.

This I think we can add. Would you be interested in signing SCA and
sending us the patch?

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com