home *** CD-ROM | disk | FTP | other *** search
- public class JSbxArrayObject extends JSbxObject implements JSbxPropertyInterface {
- private static final String NAME = "array";
- private static final int SBXARRAY_ID_LENGTH = 1;
- private String aArrTypeInfoStrg = "unknown";
-
- public final void SetArrayType(String var1) {
- this.aArrTypeInfoStrg = var1;
- }
-
- public final String GetArrayType() {
- return this.aArrTypeInfoStrg;
- }
-
- public JSbxArrayObject(long var1) {
- super(var1, JScriptManager.GetConstructorObjectForMe("DefaultConstructor"));
-
- try {
- ((JSbxObject)this).Put(new JSbxObjectProperty("length", this, this, 1, true));
- } catch (JSbxException var3) {
- }
- }
-
- public JSbxProperty Get(int var1, boolean var2) {
- JSbxObject var3 = null;
-
- try {
- var3 = this.getElement(var1);
- } catch (UnsatisfiedLinkError var4) {
- }
-
- return var3 == null ? null : new JSbxValueProperty(String.valueOf(var1), this, new JSbxValue(var3));
- }
-
- public void Put(int var1, JSbxProperty var2) {
- }
-
- public JSbxProperty Get(String var1, boolean var2) {
- JSbxProperty var3 = super.Get(var1, false);
-
- try {
- if (var3 == null) {
- JSbxObject var4 = this.getElement_String(var1);
- if (var4 == null) {
- JSbxProperty var5 = null;
- boolean var6 = false;
- int var7 = 0;
-
- try {
- var7 = Integer.parseInt(var1);
- var6 = true;
- } catch (NumberFormatException var8) {
- }
-
- if (var6) {
- var5 = this.Get(var7, false);
- }
-
- if (var5 == null && var2) {
- var5 = super.Get(var1, var2);
- }
-
- return var5;
- }
-
- return new JSbxValueProperty(var1, this, new JSbxValue(var4));
- }
- } catch (UnsatisfiedLinkError var9) {
- }
-
- return var3;
- }
-
- public JSbxValue PropertyCallFunction(JSbxObjectProperty var1, JScriptCallParam var2) throws JSbxExceptionBase {
- throw new JSbxException(0, "no such method in array");
- }
-
- public void PropertyGet(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
- int var3 = var1.GetID();
-
- try {
- switch (var3) {
- case 1:
- var2.Put(new JSbxValue((double)this.getLength()));
- return;
- default:
- throw new JSbxException(0, "no such property in SbxArray (ID=" + var3 + ")");
- }
- } catch (UnsatisfiedLinkError var4) {
- }
- }
-
- public void PropertyPut(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
- throw new JSbxException(0, "no such property in array");
- }
-
- public String Property_GetJScript_typeofString(JSbxObjectProperty var1) {
- return "object";
- }
-
- public String GetJScriptString(boolean var1) {
- return "[object " + this.aArrTypeInfoStrg + "]";
- }
-
- protected native int getLength();
-
- protected native JSbxObject getElement(int var1);
-
- protected native JSbxObject getElement_String(String var1);
- }
-