public virtual unsafe global::Java.Lang.Object CallJsFunction(global::Org.Mozilla.Javascript.Context p0, global::Org.Mozilla.Javascript.ScriptableObject p1, string p2, string p3, global::Java.Lang.Object[] p4) { const string __id = "callJsFunction.(Lorg/mozilla/javascript/Context;Lorg/mozilla/javascript/ScriptableObject;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;"; IntPtr native_p2 = JNIEnv.NewString(p2); IntPtr native_p3 = JNIEnv.NewString(p3); IntPtr native_p4 = JNIEnv.NewArray(p4); try { JniArgumentValue *__args = stackalloc JniArgumentValue [5]; __args [0] = new JniArgumentValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle); __args [1] = new JniArgumentValue((p1 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p1).Handle); __args [2] = new JniArgumentValue(native_p2); __args [3] = new JniArgumentValue(native_p3); __args [4] = new JniArgumentValue(native_p4); var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args); return(global::Java.Lang.Object.GetObject <global::Java.Lang.Object> (__rm.Handle, JniHandleOwnership.TransferLocalRef)); } finally { JNIEnv.DeleteLocalRef(native_p2); JNIEnv.DeleteLocalRef(native_p3); if (p4 != null) { JNIEnv.CopyArray(native_p4, p4); JNIEnv.DeleteLocalRef(native_p4); } } }
static IntPtr n_CallJsFunction_Lorg_mozilla_javascript_Context_Lorg_mozilla_javascript_ScriptableObject_Ljava_lang_String_Ljava_lang_String_arrayLjava_lang_Object_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1, IntPtr native_p2, IntPtr native_p3, IntPtr native_p4) { global::Com.Aliyun.Alink.Linksdk.Alcs.Jsengine.RhinoJsEngine __this = global::Java.Lang.Object.GetObject <global::Com.Aliyun.Alink.Linksdk.Alcs.Jsengine.RhinoJsEngine> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); global::Org.Mozilla.Javascript.Context p0 = global::Java.Lang.Object.GetObject <global::Org.Mozilla.Javascript.Context> (native_p0, JniHandleOwnership.DoNotTransfer); global::Org.Mozilla.Javascript.ScriptableObject p1 = global::Java.Lang.Object.GetObject <global::Org.Mozilla.Javascript.ScriptableObject> (native_p1, JniHandleOwnership.DoNotTransfer); string p2 = JNIEnv.GetString(native_p2, JniHandleOwnership.DoNotTransfer); string p3 = JNIEnv.GetString(native_p3, JniHandleOwnership.DoNotTransfer); global::Java.Lang.Object[] p4 = (global::Java.Lang.Object[])JNIEnv.GetArray(native_p4, JniHandleOwnership.DoNotTransfer, typeof(global::Java.Lang.Object)); IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.CallJsFunction(p0, p1, p2, p3, p4)); if (p4 != null) { JNIEnv.CopyArray(p4, native_p4); } return(__ret); }