Note that there are some explanatory texts on larger screens.

plurals
  1. PORename "params" parameter in Java Bindings Library with Mono for Android?
    primarykey
    data
    text
    <p>I'm trying to create a Java Binding Library for BugSense, but one of the methods has a parameter named "params" which is a reserved word in C#. I've tried to use the Metadata.xml file to rename it, but I can't figure out how to access the class, let alone the method or it's parameter.</p> <p>Here is the problem code it's generating:</p> <pre><code>namespace Com.Bugsense.Trace { [global::Android.Runtime.Register ("com/bugsense/trace/ActivityAsyncTask", DoNotGenerateAcw=true)] internal partial class ActivityAsyncTaskInvoker : ActivityAsyncTask { static IntPtr id_doInBackground_arrayLjava_lang_Object_; [Register ("doInBackground", "([Ljava/lang/Object;)Ljava/lang/Object;", "GetDoInBackground_arrayLjava_lang_Object_Handler")] protected override global::Java.Lang.Object DoInBackground (global::Java.Lang.Object[] params) { if (id_doInBackground_arrayLjava_lang_Object_ == IntPtr.Zero) id_doInBackground_arrayLjava_lang_Object_ = JNIEnv.GetMethodID (class_ref, "doInBackground", "([Ljava/lang/Object;)Ljava/lang/Object;"); IntPtr native_params = JNIEnv.NewArray (params); global::Java.Lang.Object __ret = Java.Lang.Object.GetObject&lt;global::Java.Lang.Object&gt; (JNIEnv.CallObjectMethod (Handle, id_doInBackground_arrayLjava_lang_Object_, new JValue (native_params)), JniHandleOwnership.TransferLocalRef); if (params != null) { JNIEnv.CopyArray (native_params, params); JNIEnv.DeleteLocalRef (native_params); } return __ret; } } } </code></pre> <p>Here is my mapping, which I feel should work, but just refuses to.</p> <pre><code>&lt;attr path="/api/package[@name='com.bugsense.trace']/class[@name='ActivityAsyncTaskInvoker']/method[@name='doInBackground']/parameter[@name='params']" name="managedName"&gt;@params&lt;/attr&gt; </code></pre> <p>I've tried everything I can think of. Please, HELP!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload