Here is an example of a stub:
import java.rmi.server.*;
import java.lang.reflect.Method;
import java.rmi.RemoteException;
import java.rmi.UnexpectedException;
public final synchronized class CallbackApplet_Stub
extends RemoteStub implements ClientInterface {
private static final long serialVersionUID = 2;
private static Method $method_popup_0;
static Class class$ClientInterface;
static Class class$java$lang$String;
static {
try {
$method_popup_0 = ((class$ClientInterface != null) ?
class$ClientInterface :
(class$ClientInterface = class$("ClientInterface"))).getMethod("popup", { (class$java$lang$String != null) ? class$java$lang$String : (class$java$lang$String = class$("java.lang.String")) });
} catch (NoSuchMethodException e) {
throw new NoSuchMethodError("stub class initialization failed");
}
}
public CallbackApplet_Stub(RemoteRef remoteRef) {
super(remoteRef);
}
static Class class$(
String string) {
try {
return Class.forName(string);
} catch (ClassNotFoundException e) {
throw new NoClassDefFoundError(e.getMessage());
}
}
public void popup(String string)
throws RemoteException {
try {
Object object;
ref.invoke(this, $method_popup_0, { string }, -6724103847495166028);
} catch () {
throw object;
} catch () {
throw object;
} catch () {
throw new UnexpectedException("undeclared checked exception", object);
}
}
}