dev@jaxb2-commons.java.net

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

From: Benoit Callebaut <benoit.callebaut_at_euphonynet.be>
Date: Tue, 19 Dec 2006 23:00:58 +0100

Hi,
I have also some remarks about JAXB API and I think you launched a good
thread.
I think we need to discuss the API a lot more.
The API seems to be thightly linked to the code that use it.

I think that we need to think to a more generic API.
For example something like a tree structure with standards functions
like "add" "remove" (I think to JTreeNode) and a visitor pattern to
generate the code.

I am not wrong, this current API is not part of the JAXB specification
but only of the JAXB-RI. So , it may change at any moment and maybe
replaced by something better.

What I propose is to discuss more in detail what the needs are and see
if we can write a draft document with possible modifications to the API
(along with patches and sample uses in plugins)

Julio.A.Mistral_at_wellsfargo.com a écrit :

>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
>
>JDefinedClass
>2. public void setPackage( JPackage pack ): Sets the owner to the
>provided package
>
>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.
>
>First off, is there a way to do this with the existing API? If not, can
>I petition to have these changes added to the API so I don't have to
>patch these changes into every release after 2.0.3?
>
>Thanks in advance,
>-Julio
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_jaxb2-commons.dev.java.net
>For additional commands, e-mail: dev-help_at_jaxb2-commons.dev.java.net
>
>
>
>