protected static class RMIWrap.ClientWriter extends RMIWrap.ImplementationWriter
Write foo.ImplClient from foo.API.
implementationName
interfaceClass, interfaceName
Constructor and Description |
---|
RMIWrap.ClientWriter(java.lang.Class interfaceClass,
java.lang.String implementationName)
See superclass.
|
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
classDeclExtra()
Extra stuff (e.g.
|
(package private) void |
processMethod(java.io.PrintWriter out,
java.lang.reflect.Method method)
Called by the default impl of
RMIWrap.WrapperBodyWriter.writeWrapperBody(java.io.PrintWriter) to process a
method of RMIWrap.WrapperBodyWriter.interfaceClass . |
(package private) void |
writeWrapperBody(java.io.PrintWriter out)
Write the body of the wrapper class.
|
writeDropoutHook, writeSignature, writeTypeUnwrap, writeTypeWrap
RMIWrap.ClientWriter(java.lang.Class interfaceClass, java.lang.String implementationName)
See superclass.
void writeWrapperBody(java.io.PrintWriter out)
Write the body of the wrapper class.
Default impl calls RMIWrap.WrapperBodyWriter.processMethod(java.io.PrintWriter, java.lang.reflect.Method)
for all methods of RMIWrap.WrapperBodyWriter.interfaceClass
.
This impl writes
remoteInstance
remoteInstance
remoteInstance
, calling
constructorRemoteException()
if a RemoteException occurs in
the process.constructorRemoteException()
, which calls the
generic RemoteException handler handleRemoteException
(with
method name "*constructor*") and if that returns null throws a RuntimeRemoteException
.handleRemoteException()
which returns null
(unhandled).shortCircuitRemoteCall()
which returns null (not
short-circuited).writeWrapperBody
in class RMIWrap.WrapperBodyWriter
out
- where to writevoid processMethod(java.io.PrintWriter out, java.lang.reflect.Method method)
Called by the default impl of RMIWrap.WrapperBodyWriter.writeWrapperBody(java.io.PrintWriter)
to process a
method of RMIWrap.WrapperBodyWriter.interfaceClass
.
This impl writes
remoteInstance
, first checking the generic short-circuit
handler shortCircuitRemoteCall()
(if that returns non-null
the remote call will not be attempted), and catching any RemoteException
and passing it to the generated handler (see below)handleRemoteException()
and
if that returns null throws RuntimeRemoteException
processMethod
in class RMIWrap.WrapperBodyWriter
out
- where to writemethod
- the Method to processjava.lang.String classDeclExtra()
Extra stuff (e.g. extends and implements specs) that should be added at the end of the class declaration.
Default impl returns the empty string.
This impl returns e.g. " implements foo.API".
classDeclExtra
in class RMIWrap.WrapperBodyWriter