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 16:47:33 -0800

Benoit Callebaut wrote:
> 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.

For example, JBlock already has add method. It doesn't make much sense
for things like binary operation to have add/remove methods.

Visitor on expressions are something we could consider, but what are you
going to use it for?

> 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.

It is correct that changing API is not as heavy-weight as changing the
JCP-governed JCP API. But we still need to pay attention to existing
applications that use the API. So I'd be bit skeptical about drastic
changes to the codemodel API.

> 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)

But I think discussions in detail seems useful. Do you have anything in
particular that you'd like to fix? Should this discussion move to
users_at_codemodel.dev.java.net?


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com