Widening.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4559 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2007-02-12 03:09:00 +00:00
parent d9089e10d3
commit 0a06460b24
+17 -19
View File
@@ -9,19 +9,8 @@ public dynamic class TypedArray extends Array
implements Cloneable implements Cloneable
{ {
/** /**
* Create a TypedArray * Convenience method to get the java type of an array containing objects of the specified
* * class.
* @param jtype The java classname of this array, for example "[I" to
* represent an int[], or "[Ljava.lang.Object;" for Object[].
*/
public function TypedArray (jtype :String)
{
_jtype = jtype;
}
/**
* Convenience method to get the java type of an array containing
* objects of the specified class.
*/ */
public static function getJavaType (of :Class) :String public static function getJavaType (of :Class) :String
{ {
@@ -38,20 +27,29 @@ public dynamic class TypedArray extends Array
return "[[B"; return "[[B";
} }
var cname :String = Translations.getToServer( var cname :String = Translations.getToServer(ClassUtil.getClassName(of));
ClassUtil.getClassName(of));
return "[L" + cname + ";"; return "[L" + cname + ";";
} }
/** /**
* A factory method to create a TypedArray for holding objects * A factory method to create a TypedArray for holding objects of the specified type.
* of the specified type.
*/ */
public static function create (of :Class) :TypedArray public static function create (of :Class) :TypedArray
{ {
return new TypedArray(getJavaType(of)); return new TypedArray(getJavaType(of));
} }
/**
* Create a TypedArray
*
* @param jtype The java classname of this array, for example "[I" to represent an int[], or
* "[Ljava.lang.Object;" for Object[].
*/
public function TypedArray (jtype :String)
{
_jtype = jtype;
}
public function getJavaType () :String public function getJavaType () :String
{ {
return _jtype; return _jtype;
@@ -68,8 +66,8 @@ public dynamic class TypedArray extends Array
return copy; return copy;
} }
/** The 'type' of this array, which doesn't really mean anything /** The 'type' of this array, which doesn't really mean anything except gives it a clue as to
* except gives it a clue as to how to stream to our server. */ * how to stream to our server. */
protected var _jtype :String; protected var _jtype :String;
} }
} }