Method.variables()
Method.variablesByName(String name)
Method.arguments()
All specify that they throw NativeMethodException for native methods.
This is odd for four reasons:
1) Some systems might be able to return argument info for natives.
2) The exception doesn't provide any interesting information.
3) It is hard to imagine that an application would want to handle
NativeMethodException in this case differently than
AbsentInformationException. And if it did it could call isNative().
4) NativeMethodException is a RuntimeException.
What about abstract methods? To be consistent there should be a new
exception AbstractMethodException - to which all the same counter
arguments would apply.
I propose that NativeMethodException not be thrown for these methods
and that the default implementation instead throw AbsentInformationException.
With the following documentation:
throws AbsentInformationException if there is no variable
information for this method.
Generally, local variable information is not available for
native or abstract methods (that is, their argument name
information is not available), thus they will throw this exception.
robert.field@Eng 2000-04-11
Method.variablesByName(String name)
Method.arguments()
All specify that they throw NativeMethodException for native methods.
This is odd for four reasons:
1) Some systems might be able to return argument info for natives.
2) The exception doesn't provide any interesting information.
3) It is hard to imagine that an application would want to handle
NativeMethodException in this case differently than
AbsentInformationException. And if it did it could call isNative().
4) NativeMethodException is a RuntimeException.
What about abstract methods? To be consistent there should be a new
exception AbstractMethodException - to which all the same counter
arguments would apply.
I propose that NativeMethodException not be thrown for these methods
and that the default implementation instead throw AbsentInformationException.
With the following documentation:
throws AbsentInformationException if there is no variable
information for this method.
Generally, local variable information is not available for
native or abstract methods (that is, their argument name
information is not available), thus they will throw this exception.
robert.field@Eng 2000-04-11