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:
@@ -23,7 +23,8 @@ package com.threerings.presents.net;
|
||||
|
||||
import com.threerings.presents.dobj.DObject;
|
||||
|
||||
public class ObjectResponse extends DownstreamMessage
|
||||
public class ObjectResponse<T extends DObject>
|
||||
extends DownstreamMessage
|
||||
{
|
||||
/**
|
||||
* Zero argument constructor used when unserializing an instance.
|
||||
@@ -36,12 +37,12 @@ public class ObjectResponse extends DownstreamMessage
|
||||
/**
|
||||
* Constructs an object response with the supplied distributed object.
|
||||
*/
|
||||
public ObjectResponse (DObject dobj)
|
||||
public ObjectResponse (T dobj)
|
||||
{
|
||||
_dobj = dobj;
|
||||
}
|
||||
|
||||
public DObject getObject ()
|
||||
public T getObject ()
|
||||
{
|
||||
return _dobj;
|
||||
}
|
||||
@@ -52,5 +53,5 @@ public class ObjectResponse extends DownstreamMessage
|
||||
}
|
||||
|
||||
/** The object which is associated with this response. */
|
||||
protected DObject _dobj;
|
||||
protected T _dobj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user