Exemplo n.º 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_createAdapter(cx, scope, args);
     }
   }
   throw f.unknown();
 }
Exemplo n.º 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();
 }