示例#1
0
 public Object execIdCall(
     IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
   if (f.hasTag(FTAG)) {
     if (f.methodId() == Id_JavaAdapter) {
       return js_createAdpter(cx, scope, args);
     }
   }
   throw f.unknown();
 }
示例#2
0
 public static void init(Context cx, Scriptable scope, boolean sealed) {
   JavaAdapter obj = new JavaAdapter();
   IdFunctionObject ctor =
       new IdFunctionObject(obj, FTAG, Id_JavaAdapter, "JavaAdapter", 1, scope);
   ctor.markAsConstructor(null);
   if (sealed) {
     ctor.sealObject();
   }
   ctor.exportAsScopeProperty();
 }