A Question regarding the JVM spec and how javassist is expected to handle it.
I’ve an interface IMyFactory extending the Remote interface.
It declares a method foo() which declares throws RemoteException so will be deemed as remotable API
The implementing class implements the method but doesn’t declare itself as throwing the remote.
Code wise the JVM picked this method as valid Remote API
Javassist when interrogated class MyFactory.foo() method doesn’t provide any data on its being a throwing RemoteException
Questions
In addition it allows an implementing method to declare less “throws” then its super / defining interface without loss of polymorphism
Why wont javassist provide me the exception data defined in the Interface’s CtClass ?
2) Is there a “recoursive” API in javassist that will wllow me to intergoate a method up to its interface definition to see if some one above it has defined it to be an
Throwable thrower or do I need to implement such search myself ?
Code example:
{...
@Override
public int foo() //on purpose didn’t declare “throws java.rmi.RemoteException”
{
// TODO Auto-generated method stub
return 0;
}
{
public int foo() throws RemoteException;
}