home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 November / PCONLINE_11_99.ISO / filesbbs / OS2 / APCHSSL2.ZIP / OS2HTTPD / jserv / com / netscape / javascript / Undefined.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-09  |  2.7 KB  |  111 lines

  1. package com.netscape.javascript;
  2.  
  3. public class Undefined implements Scriptable {
  4.    public static final Scriptable instance = new Undefined();
  5.    public static Object obj;
  6.    // $FF: renamed from: id java.lang.Object
  7.    public static Object field_0;
  8.  
  9.    public boolean hasInstance(Scriptable var1) {
  10.       throw this.reportError();
  11.    }
  12.  
  13.    public Object get(String var1, Scriptable var2) {
  14.       throw this.reportError();
  15.    }
  16.  
  17.    public Object get(int var1, Scriptable var2) {
  18.       throw this.reportError();
  19.    }
  20.  
  21.    public void put(String var1, Scriptable var2, Object var3) {
  22.       throw this.reportError();
  23.    }
  24.  
  25.    public void put(int var1, Scriptable var2, Object var3) {
  26.       throw this.reportError();
  27.    }
  28.  
  29.    public Object getDefaultValue(Class var1) {
  30.       if (var1 == ScriptRuntime.StringClass) {
  31.          return "undefined";
  32.       } else if (var1 == ScriptRuntime.NumberClass) {
  33.          return ScriptRuntime.NaNobj;
  34.       } else {
  35.          return var1 == ScriptRuntime.BooleanClass ? Boolean.FALSE : this;
  36.       }
  37.    }
  38.  
  39.    public Scriptable getPrototype() {
  40.       throw this.reportError();
  41.    }
  42.  
  43.    public void setPrototype(Scriptable var1) {
  44.       throw this.reportError();
  45.    }
  46.  
  47.    public short getAttributes(String var1, Scriptable var2) {
  48.       throw this.reportError();
  49.    }
  50.  
  51.    public Scriptable getParentScope() {
  52.       throw this.reportError();
  53.    }
  54.  
  55.    public void setParentScope(Scriptable var1) {
  56.       throw this.reportError();
  57.    }
  58.  
  59.    public short getAttributes(int var1, Scriptable var2) {
  60.       throw this.reportError();
  61.    }
  62.  
  63.    public void setAttributes(String var1, Scriptable var2, short var3) {
  64.       throw this.reportError();
  65.    }
  66.  
  67.    public void setAttributes(int var1, Scriptable var2, short var3) {
  68.       throw this.reportError();
  69.    }
  70.  
  71.    private RuntimeException reportError() {
  72.       String var1;
  73.       if (field_0 != null && obj != null) {
  74.          Object[] var2 = new Object[]{field_0.toString(), obj.toString()};
  75.          var1 = Context.getMessage("msg.undefined1", var2);
  76.       } else {
  77.          var1 = Context.getMessage("msg.undefined", (Object[])null);
  78.       }
  79.  
  80.       return Context.reportRuntimeError(var1);
  81.    }
  82.  
  83.    public boolean instanceOf(Scriptable var1) {
  84.       return false;
  85.    }
  86.  
  87.    public boolean has(String var1, Scriptable var2) {
  88.       return false;
  89.    }
  90.  
  91.    public boolean has(int var1, Scriptable var2) {
  92.       return false;
  93.    }
  94.  
  95.    public void delete(String var1) {
  96.       throw this.reportError();
  97.    }
  98.  
  99.    public void delete(int var1) {
  100.       throw this.reportError();
  101.    }
  102.  
  103.    public Object[] getIds() {
  104.       throw this.reportError();
  105.    }
  106.  
  107.    public String getClassName() {
  108.       return "undefined";
  109.    }
  110. }
  111.