I have the patch, I will try to look at it on the
plane ride home tonight. I don't predict that there'll be anything
objectionable in there, but I can't say anything about it until then. As
far as I'm concerned, you can go for it and I'll -1 later on the off chance it's
needed.
--G
----- Original Message -----
Sent: Thursday, June 06, 2002 7:03
AM
Subject: Re: Rewrite of JavaWriter
Silence is assent?
I'll check these changes in sometime
today.
Russell Butek [EMAIL PROTECTED]
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED] cc: Subject:
Rewrite of JavaWriter
My next step in revamping WSDL2Java was rewriting JavaWriter (and
consequently all its subclasses). Before I commit these changes, I want to
pass them by y'all to make sure I don't break anyone without their knowledge.
The build still succeeds with these changes. I'd like to commit these in the
next day or two, so I'd appreciate a quick look-see by those that are
concerned.
Primarily, the changes
are: 1. JavaWriter is broken into two abstract classes:
JavaWriter and subclass JavaClassWriter. JavaDeployWriter and
JavaUndeployWriter extend JavaWriter directly. The rest, since they all
generate Java classes, extend JavaClassWriter. In the old version,
JavaDeployWriter and JavaUndeployWriter did some hokey things to fit into the
class model.
2. The constructors are simpler:
JavaWriter(Emitter e), JavaClassWriter(Emitter e, String filename, String
type). Less has to be known/calculated in the constructor. For example:
old JavaHolderWriter ctor:
super( emitter, new QName( type.getQName().getNamespaceURI(), Utils.holder(type, emitter).substring( Utils.holder(type, emitter).lastIndexOf('.') + 1)), null, "java", JavaUtils.getMessage("genHolder00"), "holder");
new JavaHolderWriter ctor:
super(emitter, Utils.holder(type, emitter),
"holder");
3. Most write methods now take a
PrintWriter parameter instead of assuming the superclass has a PrintWriter.
This makes it easy to embed one generated class inside another
(JavaBeanHelperWriter).
4. There is now behaviour
on JavaWriter and JavaClassWriter. This behavior makes it easier to do
piecemeal extensions.
Here's the javadoc for
JavaWriter: (See attached file:
JavaWriter.html). Look particularly at the class
comments.
Here's the javadoc for JavaClassWriter:
(See attached file:
JavaClassWriter.html).
Here's the set of changes: (See attached file:
diff). If anyone cares, I can zip up the actual code
for them.
Russell Butek [EMAIL PROTECTED]
|