We're getting very close to having generated ActionScript Service and Listener

interfaces, and Marshallers for same. The remaining snag has to do with the
annoyance of ActionScript not supporting inner classes, which means that
ChatService.TellListener for example has to become ChatService_TellListener.

The code for generating the Java marshaller knows to add an import for
ChatService if some random invocation service interface happens to reference
ChatService.TellListener, but now it needs to be made to know to add an import
for ChatService_TellListener in ActionScript land and it has to do it in a way
that doesn't fuck up the Java code generation. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4397 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2006-10-04 18:12:56 +00:00
parent 3305c1b922
commit d25d5e53f1
8 changed files with 421 additions and 24 deletions
@@ -15,7 +15,9 @@ public class ${name}Marshaller extends InvocationMarshaller
implements ${name}Service
{
#foreach ($l in $listeners)
// documentation inherited
/**
* Marshalls results to implementations of {@link ${l.name}Listener}.
*/
public static class ${l.name}Marshaller extends ListenerMarshaller
implements ${l.name}Listener
{
@@ -24,7 +26,7 @@ public class ${name}Marshaller extends InvocationMarshaller
* responses. */
public static final int $lm.code = $velocityCount;
// documentation inherited from interface
// from interface ${l.name}Marshaller
public void $lm.method.name ($lm.getArgList(false))
{
_invId = null;
@@ -34,7 +36,7 @@ public class ${name}Marshaller extends InvocationMarshaller
}
#end
// documentation inherited
@Override // from InvocationMarshaller
public void dispatchResponse (int methodId, Object[] args)
{
switch (methodId) {
@@ -54,10 +56,13 @@ public class ${name}Marshaller extends InvocationMarshaller
#end
#foreach ($m in $methods)
#if ($velocityCount > 1)
#end
/** The method id used to dispatch {@link #$m.method.name} requests. */
public static final int $m.code = $velocityCount;
// documentation inherited from interface
// from interface ${name}Service
public void $m.method.name ($m.getArgList(false))
{
#foreach ($la in $m.listenerArgs)
@@ -68,6 +73,5 @@ public class ${name}Marshaller extends InvocationMarshaller
$m.getWrappedArgList(true)
});
}
#end
}