Improved Java to ActionScript field type conversion.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4413 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2006-10-05 20:30:30 +00:00
parent c7dd56f845
commit 63c4e10d3c
@@ -268,21 +268,22 @@ public class ActionScriptSource
return isField ? "TypedArray" : "Array";
}
String tname = type.getName();
if (tname.equals("java.lang.Integer") ||
tname.equals("byte")) {
if (Integer.class.equals(type) ||
Byte.TYPE.equals(type) ||
Short.TYPE.equals(type) ||
Character.TYPE.equals(type)) {
return "int";
}
if (tname.equals("long")) {
if (Long.TYPE.equals(type)) {
return "Long";
}
if (tname.equals("boolean")) {
if (Boolean.TYPE.equals(type)) {
return "Boolean";
}
return toSimpleName(tname);
return toSimpleName(type.getName());
}
public ActionScriptSource (Class jclass)