Do instanceof Streamable sensibly instead of via the cracksmoking way I was
doing it. Don't generate ActionScript methods for the instrumented field reader and writer methods. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4798 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -181,15 +181,7 @@ public class GenActionScriptTask extends Task
|
||||
assrc.absorbJava(source);
|
||||
|
||||
// see if our parent also implements Streamable
|
||||
boolean needSuper = false;
|
||||
Class supster = sclass.getSuperclass();
|
||||
do {
|
||||
if (isStreamable(supster)) {
|
||||
needSuper = true;
|
||||
break;
|
||||
}
|
||||
supster = supster.getSuperclass();
|
||||
} while (supster != null);
|
||||
boolean needSuper = Streamable.class.isAssignableFrom(sclass.getSuperclass());
|
||||
|
||||
// add readObject() and writeObject() definitions
|
||||
ActionScriptSource.Member member;
|
||||
@@ -252,16 +244,6 @@ public class GenActionScriptTask extends Task
|
||||
assrc.write(new PrintWriter(out));
|
||||
}
|
||||
|
||||
protected boolean isStreamable (Class clazz)
|
||||
{
|
||||
for (Class iface : clazz.getInterfaces()) {
|
||||
if (Streamable.class.equals(iface)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean isStreamable (Field field)
|
||||
{
|
||||
int mods = field.getModifiers();
|
||||
|
||||
Reference in New Issue
Block a user