dev@jax-ws.java.net

Re: XmlStreamBuffer improvements

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 15 Dec 2005 12:38:55 +0100

[Moving to dev_at_jax-ws.dev.java.net]

Kohsuke Kawaguchi wrote:
>
> I had a chance to use it a little and I think the following improvements
> would be nice:
>
> - The code needs to be documented better. It doesn't have to be
> thorough, but at least the XMLStreamBuffer and some of the major classes
> need to have reasonable javadoc.
>

I know :-) It is something i have been meaning to do. Will get to it ASAP.


> - There should be javadoc somewhere. It should be easy to have a link to
> javadoc in Hudson's workspace from the project description page in
> Hudson. I can also probably help you if you want to put javadoc to the
> java.net project.
>

OK. Putting the latest on java.net automatically would i think be better
so that it is accessible externally.


> - As an user, the smaller the developer surface of the API, the better.
> XMLStreamBuffer exposes so many methods that aren't for users, and I
> wonder if they can be hidden. For example, do those constants need to be
> on this class? Is there any way to completely hide implementation details?
>
> Those additional fields/methods make it difficult for me to get to the
> right method when I do:
>
> XMLStreamBuffer buf = new XMLStreamBuffer();
> buf.
>
> to find out what I can do with XMLStreamBuffer (or when I'm browsing
> javadoc trying to figure out how I can use it.)
>

Good point.

> - By the same token, XMLStreamBuffer should have methods like
>
> XMLStreamReader createStreamReader();
> void produceSAXEvents(ContentHandler h);
>
> or something like it. It's easier to find than
>
> StreamReaderBufferProcessor r
> = new StreamReaderBufferProcessor();
> r.setXMLStreamBuffer(buf);
>

Another good point.

I just committed some new code back that moves the constant fields from
XMLStreamBuffer to AbstractCreatorProcessor and adds helper methods to
XMLStreamBuffer to process and create.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109