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:
@@ -69,10 +69,11 @@ public class TimeBaseProvider
|
||||
* base object is created or if the creation fails.
|
||||
*/
|
||||
public static void createTimeBase (
|
||||
final String timeBase, final ResultListener resl)
|
||||
final String timeBase, final ResultListener<TimeBaseObject> resl)
|
||||
{
|
||||
_omgr.createObject(TimeBaseObject.class, new Subscriber () {
|
||||
public void objectAvailable (DObject object) {
|
||||
_omgr.createObject(TimeBaseObject.class,
|
||||
new Subscriber<TimeBaseObject> () {
|
||||
public void objectAvailable (TimeBaseObject object) {
|
||||
// stuff it into our table
|
||||
_timeBases.put(timeBase, object);
|
||||
// and notify the listener
|
||||
@@ -95,7 +96,7 @@ public class TimeBaseProvider
|
||||
*/
|
||||
public static TimeBaseObject getTimeBase (String timeBase)
|
||||
{
|
||||
return (TimeBaseObject)_timeBases.get(timeBase);
|
||||
return _timeBases.get(timeBase);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,7 +117,8 @@ public class TimeBaseProvider
|
||||
}
|
||||
|
||||
/** Used to keep track of our time base objects. */
|
||||
protected static HashMap _timeBases = new HashMap();
|
||||
protected static HashMap<String,TimeBaseObject> _timeBases =
|
||||
new HashMap<String,TimeBaseObject>();
|
||||
|
||||
/** The invocation manager with which we interoperate. */
|
||||
protected static InvocationManager _invmgr;
|
||||
|
||||
Reference in New Issue
Block a user