Widening; nixed import of receiver as it's not needed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5244 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -41,8 +41,7 @@ import com.threerings.presents.data.ClientObject;
|
|||||||
import com.threerings.presents.server.InvocationSender;
|
import com.threerings.presents.server.InvocationSender;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An Ant task for generating invocation receiver marshalling and unmarshalling
|
* An Ant task for generating invocation receiver marshalling and unmarshalling classes.
|
||||||
* classes.
|
|
||||||
*/
|
*/
|
||||||
public class GenReceiverTask extends InvocationTask
|
public class GenReceiverTask extends InvocationTask
|
||||||
{
|
{
|
||||||
@@ -61,17 +60,12 @@ public class GenReceiverTask extends InvocationTask
|
|||||||
// verify that the receiver class name is as we expect it to be
|
// verify that the receiver class name is as we expect it to be
|
||||||
if (!rname.endsWith("Receiver")) {
|
if (!rname.endsWith("Receiver")) {
|
||||||
System.err.println("Cannot process '" + rname + "':");
|
System.err.println("Cannot process '" + rname + "':");
|
||||||
System.err.println(
|
System.err.println("Receiver classes must be named SomethingReceiver.");
|
||||||
"Receiver classes must be named SomethingReceiver.");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImportSet imports = new ImportSet();
|
ImportSet imports = new ImportSet();
|
||||||
ComparableArrayList<ServiceMethod> methods =
|
ComparableArrayList<ServiceMethod> methods = new ComparableArrayList<ServiceMethod>();
|
||||||
new ComparableArrayList<ServiceMethod>();
|
|
||||||
|
|
||||||
// we need to import the receiver itself
|
|
||||||
imports.add(receiver);
|
|
||||||
|
|
||||||
// look through and locate our receiver methods
|
// look through and locate our receiver methods
|
||||||
Method[] methdecls = receiver.getDeclaredMethods();
|
Method[] methdecls = receiver.getDeclaredMethods();
|
||||||
@@ -89,14 +83,12 @@ public class GenReceiverTask extends InvocationTask
|
|||||||
// Adjust any bits that want to import arrays to instead import their element classes.
|
// Adjust any bits that want to import arrays to instead import their element classes.
|
||||||
imports.translateClassArrays();
|
imports.translateClassArrays();
|
||||||
imports.removeArrays();
|
imports.removeArrays();
|
||||||
|
|
||||||
// get rid of primitives and java.lang types
|
// get rid of primitives and java.lang types
|
||||||
imports.removeGlobals();
|
imports.removeGlobals();
|
||||||
|
|
||||||
generateSender(source, rname, rpackage, methods,
|
generateSender(source, rname, rpackage, methods, imports.toList().iterator());
|
||||||
imports.toList().iterator());
|
generateDecoder(source, rname, rpackage, methods, imports.toList().iterator());
|
||||||
generateDecoder(source, rname, rpackage, methods,
|
|
||||||
imports.toList().iterator());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void generateSender (File source, String rname, String rpackage,
|
protected void generateSender (File source, String rname, String rpackage,
|
||||||
|
|||||||
Reference in New Issue
Block a user