Have the actionscript-generating stuff understand TypedArray.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4751 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -55,10 +55,14 @@ public class GenUtil extends com.samskivert.util.GenUtil
|
|||||||
public static String simpleASName (Class<?> clazz)
|
public static String simpleASName (Class<?> clazz)
|
||||||
{
|
{
|
||||||
if (clazz.isArray()) {
|
if (clazz.isArray()) {
|
||||||
if (Byte.TYPE.equals(clazz.getComponentType())) {
|
Class compoType = clazz.getComponentType();
|
||||||
|
if (Byte.TYPE.equals(compoType)) {
|
||||||
return "ByteArray";
|
return "ByteArray";
|
||||||
|
} else if (Object.class.equals(compoType)) {
|
||||||
|
return "Array";
|
||||||
|
} else {
|
||||||
|
return "TypedArray /* of " + compoType + " */";
|
||||||
}
|
}
|
||||||
return "Array";
|
|
||||||
} else if (clazz == Boolean.TYPE) {
|
} else if (clazz == Boolean.TYPE) {
|
||||||
return "Boolean";
|
return "Boolean";
|
||||||
} else if (clazz == Byte.TYPE || clazz == Character.TYPE ||
|
} else if (clazz == Byte.TYPE || clazz == Character.TYPE ||
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package $package {
|
|||||||
|
|
||||||
import flash.utils.ByteArray;
|
import flash.utils.ByteArray;
|
||||||
import com.threerings.util.*; // for Float, Integer, etc.
|
import com.threerings.util.*; // for Float, Integer, etc.
|
||||||
|
import com.threerings.io.TypedArray;
|
||||||
|
|
||||||
#foreach ($import in $imports)
|
#foreach ($import in $imports)
|
||||||
import $import;
|
import $import;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package $package {
|
|||||||
|
|
||||||
import flash.utils.ByteArray;
|
import flash.utils.ByteArray;
|
||||||
import com.threerings.util.*; // for Float, Integer, etc.
|
import com.threerings.util.*; // for Float, Integer, etc.
|
||||||
|
import com.threerings.io.TypedArray;
|
||||||
|
|
||||||
#foreach ($import in $imports)
|
#foreach ($import in $imports)
|
||||||
import $import;
|
import $import;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package $package {
|
package $package {
|
||||||
|
|
||||||
import flash.utils.ByteArray;
|
import flash.utils.ByteArray;
|
||||||
|
import com.threerings.io.TypedArray;
|
||||||
#foreach ($import in $imports)
|
#foreach ($import in $imports)
|
||||||
import $import;
|
import $import;
|
||||||
#end
|
#end
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package $package {
|
|||||||
|
|
||||||
import flash.utils.ByteArray;
|
import flash.utils.ByteArray;
|
||||||
import com.threerings.util.*; // for Float, Integer, etc.
|
import com.threerings.util.*; // for Float, Integer, etc.
|
||||||
|
import com.threerings.io.TypedArray;
|
||||||
|
|
||||||
#foreach ($import in $imports)
|
#foreach ($import in $imports)
|
||||||
import $import;
|
import $import;
|
||||||
|
|||||||
Reference in New Issue
Block a user