I decided to go hog wild and clean up all the type use in Presents which

required some serious bending and folding of the generic type system, but for
the most part we managed to avoid any mutilating. The gendobj task now
generates properly typed "addToXXX" and "updateXXX" DSet methods based on the
parameterized type of the DSet. This might cause unrecompiled code to break,
but I don't think there are many cases in the base toolkit where people call
DSet adders or updaters. We'll see and I'll add backwards compatibility
versions for cases where we need them to support GG games (everything else we
can just recompile).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4245 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2006-07-05 00:55:05 +00:00
parent 94b79826d4
commit 8afd0316ec
27 changed files with 269 additions and 212 deletions
@@ -68,8 +68,9 @@ public class GenReceiverTask extends InvocationTask
return;
}
HashMap imports = new HashMap();
ComparableArrayList methods = new ComparableArrayList();
HashMap<String,Boolean> imports = new HashMap<String,Boolean>();
ComparableArrayList<ServiceMethod> methods =
new ComparableArrayList<ServiceMethod>();
// we need to import the receiver itself
imports.put(importify(receiver.getName()), Boolean.TRUE);
@@ -94,14 +95,14 @@ public class GenReceiverTask extends InvocationTask
}
protected void generateSender (File source, String rname, String rpackage,
List methods, Iterator imports)
List methods, Iterator<String> imports)
{
String name = StringUtil.replace(rname, "Receiver", "");
String sname = StringUtil.replace(rname, "Receiver", "Sender");
String spackage = StringUtil.replace(rpackage, ".client", ".server");
// construct our imports list
ComparableArrayList implist = new ComparableArrayList();
ComparableArrayList<String> implist = new ComparableArrayList<String>();
CollectionUtil.addAll(implist, imports);
checkedAdd(implist, ClientObject.class.getName());
checkedAdd(implist, InvocationSender.class.getName());
@@ -134,13 +135,13 @@ public class GenReceiverTask extends InvocationTask
protected void generateDecoder (
File source, String rname, String rpackage, List methods,
Iterator imports)
Iterator<String> imports)
{
String name = StringUtil.replace(rname, "Receiver", "");
String dname = StringUtil.replace(rname, "Receiver", "Decoder");
// construct our imports list
ComparableArrayList implist = new ComparableArrayList();
ComparableArrayList<String> implist = new ComparableArrayList<String>();
CollectionUtil.addAll(implist, imports);
checkedAdd(implist, InvocationDecoder.class.getName());
implist.sort();