home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 August / PCO0897.ISO / filesbbs / os2 / fp1os2.arj / OS2 / DATA / 49 / C / 0 / F_26836 / JScriptArgumentsObject.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-05-15  |  2.4 KB  |  75 lines

  1. public class JScriptArgumentsObject extends JSbxObject implements JSbxPropertyInterface {
  2.    private JScriptCallLevelInstance aCallLevelInstance;
  3.    private int nParamCount;
  4.    private JSbxObjectProperty aParamCountProp;
  5.  
  6.    public int GetParamCount() {
  7.       return this.nParamCount;
  8.    }
  9.  
  10.    public JSbxObjectProperty GetParamCountProp() {
  11.       return this.aParamCountProp;
  12.    }
  13.  
  14.    public JScriptArgumentsObject(JScriptCallLevelInstance var1) {
  15.       this.aCallLevelInstance = var1;
  16.       this.aParamCountProp = new JSbxObjectProperty("length", (JSbxObject)null, this, 0);
  17.    }
  18.  
  19.    public void InitCall(int var1, JScriptMethod var2) {
  20.       this.nParamCount = var1;
  21.       this.aParamCountProp.SetThisParentObj(var2);
  22.    }
  23.  
  24.    public void Put(JSbxProperty var1) throws JSbxException {
  25.       this.aCallLevelInstance.GetMethod().Put(var1);
  26.    }
  27.  
  28.    public JSbxProperty Get(String var1, boolean var2) {
  29.       return (JSbxProperty)(var1.equals("length") ? this.aParamCountProp : this.aCallLevelInstance.GetMethod().Get(var1, var2));
  30.    }
  31.  
  32.    public void Put(int var1, JSbxProperty var2) {
  33.       if (var1 >= this.nParamCount) {
  34.          this.aCallLevelInstance.GetMethod().Put(var1, var2);
  35.       }
  36.  
  37.    }
  38.  
  39.    public JSbxProperty Get(int var1, boolean var2) {
  40.       return var1 >= this.nParamCount ? this.aCallLevelInstance.GetMethod().Get(var1, var2) : this.aCallLevelInstance.Get(var1, false);
  41.    }
  42.  
  43.    public void PropertyGet(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
  44.       JSbxValue var3 = new JSbxValue((double)this.nParamCount);
  45.       var2.Put(var3);
  46.    }
  47.  
  48.    public String GetJScriptString() {
  49.       return this.aCallLevelInstance.GetMethod().GetJScriptString();
  50.    }
  51.  
  52.    public JSbxValue PropertyCallFunction(JSbxObjectProperty var1, JScriptCallParam var2) throws JSbxExceptionBase {
  53.       return null;
  54.    }
  55.  
  56.    public void PropertyPut(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
  57.    }
  58.  
  59.    public String Property_GetJScript_typeofString(JSbxObjectProperty var1) {
  60.       return "function";
  61.    }
  62.  
  63.    public JSbxNameArray DEBUG_GetNameArray() {
  64.       return this.aCallLevelInstance.DEBUG_GetNameArray();
  65.    }
  66.  
  67.    public JSbxIndexArray DEBUG_GetIndexArray() {
  68.       return this.aCallLevelInstance.DEBUG_GetIndexArray();
  69.    }
  70.  
  71.    public JSbxStack DEBUG_GetSearchStack() {
  72.       return this.aCallLevelInstance.DEBUG_GetSearchStack();
  73.    }
  74. }
  75.