Turns out they did fix the describeType bugs, but also changed the format

of the output.
Update code to recognize the new format and stop working around the old bugs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4108 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-05-10 21:11:56 +00:00
parent e732fe48aa
commit 164d746072
2 changed files with 5 additions and 20 deletions
-12
View File
@@ -70,7 +70,6 @@ public class Streamer
initStreamers();
// see if we have a streamer for it
// Log.debug("getStreamer/existing");
for each (var streamer :Streamer in _streamers) {
if (streamer.getJavaClassName() === jname) {
return streamer;
@@ -78,7 +77,6 @@ public class Streamer
}
// see if it's an array that we unstream using an ArrayStreamer
// Log.debug("getStreamer/array");
if (jname.charAt(0) === "[") {
var streamer :Streamer = new ArrayStreamer(jname);
_streamers.push(streamer);
@@ -86,22 +84,12 @@ public class Streamer
}
// otherwise see if it represents a Streamable
// Log.debug("getStreamer/Class:Streamable");
var clazz :Class = ClassUtil.getClassByName(
Translations.getFromServer(jname));
// Log.debug("getStreamer/Class:Streamable2");
if (ClassUtil.isAssignableAs(Streamable, clazz)) {
return null; // it's streamable
}
// TEMP: workaround for fucked-up bug!!!
// The isAssignableAs (above) does not work right now, so we assume
// ALL classes are streamable, to get things working.
if (true) {
return null;
}
// END: hacky temp
return BAD_STREAMER;
}
+5 -8
View File
@@ -67,21 +67,18 @@ public class ClassUtil
var typeInfo :XMLList = describeType(srcClass).child("factory");
// See which classes we extend.
var exts :XMLList = typeInfo.child("extends").attribute("type");
var exts :XMLList = typeInfo.child("extendsClass").attribute("type");
for each (var type :String in exts) {
//if (asClass == getClassByName(type)) {
// TEMP: recursing sometimes gets around a describeType bug
if (isAssignableAs(asClass, getClassByName(type))) {
if (asClass == getClassByName(type)) {
return true;
}
}
// See which interfaces we implement.
var imps :XMLList = typeInfo.child("implements").attribute("type");
var imps :XMLList = typeInfo.child("implementsInterface")
.attribute("type");
for each (var type :String in imps) {
//if (asClass == getClassByName(type)) {
// TEMP: recursing sometimes gets around a describeType bug
if (isAssignableAs(asClass, getClassByName(type))) {
if (asClass == getClassByName(type)) {
return true;
}
}