Hi, list
is it on purpose that there is no removeXXX for many functions, especially
Exceptions?
I just saw that I'd need a small function like this in AbstractJavaMethod:
/** <p>Removes an exception from this methods list of exceptions.</p>
* @param exc
*/
public void removeThrows(JavaQName exc) {
exceptions.remove(exc);
}
I was generating a proxy and made myself a little method
/**
* copies all exceptions from method <code>method</code> to method
<code>target</code>.
*
* @param target
* @param method
*/
private void copyExceptions(AbstractJavaMethod target,
AbstractJavaMethod method) {
if (method == null) { return; }
JavaQName exceptions[] = method.getExceptions();
for (int j = 0; j < exceptions.length; j++) {
target.addThrows(exceptions[j]);
}
}
so that I'd have the same exceptions as the delegation object (actually
for this I needed the "don't add exceptions already there" patch, since
it's used in an inner loop).
But then for a specific exception I wanted to write a handler. I used
addTry... addCatch sucessfully, but then noticed that the exceptions I've
declared (by copying) to be thrown are not removed. Well, that's
absolutely ok, I guess, but then again, I wanted to remove them manually.
Since AbstractJavaMethod.exceptions is private I can only do this directly
in this class.
So what do you think - should this little helper (and similar variants
with String or Class as parameters) be included in jaxmejs?
:Frederic:
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]