Spot stuff in AbjectScript.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4144 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,12 +1,32 @@
|
||||
package com.threerings.io {
|
||||
|
||||
import com.threerings.util.ClassUtil;
|
||||
|
||||
public dynamic class TypedArray extends Array
|
||||
{
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to get the java type of an array containing
|
||||
* objects of the specified class.
|
||||
*/
|
||||
public static function getJavaType (of :Class) :String
|
||||
{
|
||||
var cname :String = Translations.getToServer(
|
||||
ClassUtil.getClassName(of));
|
||||
// TODO: primitive types
|
||||
return "[L" + cname + ";";
|
||||
}
|
||||
|
||||
public function getJavaType () :String
|
||||
{
|
||||
return _jtype;
|
||||
|
||||
Reference in New Issue
Block a user