docs: public Scriptable wrapNewObject(Context cx, Scriptable scope, Object obj)
      {
          if (obj instanceof Scriptable) {
              return (Scriptable)obj;
          }
          Class<?> cls = obj.getClass();
          if (cls.isArray()) {
              return NativeJavaArray.wrap(scope, obj);
          }
          return wrapAsJavaObject(cx, scope, obj, null);
      }