Fixed another couple of bugs in service generation discovered when generating services for vilya

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5122 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Jamie Doornbos
2008-05-23 00:40:56 +00:00
parent 19e15911aa
commit 35955cc701
@@ -317,6 +317,11 @@ public class GenServiceTask extends InvocationTask
// convert primitive java types to ooo util types
imports.replace("long", "com.threerings.util.Long");
// convert object arrays to typed arrays
if (imports.removeAll("[L*") > 0) {
imports.add("com.threerings.io.TypedArray");
}
// get rid of remaining primitives and java.lang types
imports.removeGlobals();
@@ -404,6 +409,11 @@ public class GenServiceTask extends InvocationTask
// change Foo$Bar to Foo_Bar
imports.translateInnerClasses();
// use a typed array for any arrays of objects
if (imports.removeAll("[L*") > 0) {
imports.add("com.threerings.io.TypedArray");
}
// convert java primitive types to ooo util types
imports.replace("long", "com.threerings.util.Long");