Frederic Ahring wrote:
please keep in mind that I have neither CVS nor diff around here.
Such developer systems do still exist? :-)
I changed AbstractJavaMethod, adding removeThrows for String, Class and JavaQName, and also added a clearThrows() method.
I have integrated these patches, the exception being removeThrows(String). The methods accepting a string are deprecated, so I decided to remove them finally.
Finally I added two methods String[] getParamNames and JavaQName[] getParamTypes which, similar to Parameter[] getParams, return a list of parameters this function takes. getParamTypes is useful in combination with JavaSource.getMethod(String, JavaQName[]), as it can be directly used as second parameter.
Integrated.
This is all I had in mind for today. I checked in ConditionalIndentationJavaSourceObject, because I thought it would be nice to have addThrowNew automatically call addThrow, but it is in different classes. I'm not sure as to why it's split up in this way, but I didn't want to mess with it too much.
A ConditionalIndentationJavaSourceObject doesn't necessarily have a signature. Think of a static class initializer.
Other thing I have needed (but found other ways of doing it) were having a helpermethod which would give me an unused local variable name, for using as a loop variable while being called recursively. I had an Stringlist, initially filled with getParamNames.
This is, imo, not necessary, because the necessary code is already in place. For example, ConditionalJavaSourceObject.newJavaField(JavaQName) creates a new local field with the given type and a unique name.
The second thing that I thought I needed was a possibility to generate JavaCode without it being part of a method, to be added later. Placeholder didn't completely satisfy me, as indentations would be wrong. Since I didn't actually need it I haven't investigated this further. But I think it is not yet possible, is it?
This should not be too difficult. One could create a subclass of JavaSourceObject, which represents an anonymous block { ... }. The braces could be optional, of course. This object might be added to a method at a later time.
Jochen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
