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:
@@ -268,21 +268,22 @@ public class ActionScriptSource
|
|||||||
return isField ? "TypedArray" : "Array";
|
return isField ? "TypedArray" : "Array";
|
||||||
}
|
}
|
||||||
|
|
||||||
String tname = type.getName();
|
if (Integer.class.equals(type) ||
|
||||||
if (tname.equals("java.lang.Integer") ||
|
Byte.TYPE.equals(type) ||
|
||||||
tname.equals("byte")) {
|
Short.TYPE.equals(type) ||
|
||||||
|
Character.TYPE.equals(type)) {
|
||||||
return "int";
|
return "int";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tname.equals("long")) {
|
if (Long.TYPE.equals(type)) {
|
||||||
return "Long";
|
return "Long";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tname.equals("boolean")) {
|
if (Boolean.TYPE.equals(type)) {
|
||||||
return "Boolean";
|
return "Boolean";
|
||||||
}
|
}
|
||||||
|
|
||||||
return toSimpleName(tname);
|
return toSimpleName(type.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionScriptSource (Class jclass)
|
public ActionScriptSource (Class jclass)
|
||||||
|
|||||||
Reference in New Issue
Block a user