|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using Android.Runtime; |
| 4 | + |
| 5 | +namespace Xamarin.Test { |
| 6 | + |
| 7 | + // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']" |
| 8 | + [global::Android.Runtime.Register ("xamarin/test/SomeObject2", DoNotGenerateAcw=true)] |
| 9 | + public sealed partial class SomeObject2 : global::Java.Lang.Object { |
| 10 | + |
| 11 | + internal static new IntPtr java_class_handle; |
| 12 | + internal static new IntPtr class_ref { |
| 13 | + get { |
| 14 | + return JNIEnv.FindClass ("xamarin/test/SomeObject2", ref java_class_handle); |
| 15 | + } |
| 16 | + } |
| 17 | + |
| 18 | + protected override IntPtr ThresholdClass { |
| 19 | + get { return class_ref; } |
| 20 | + } |
| 21 | + |
| 22 | + protected override global::System.Type ThresholdType { |
| 23 | + get { return typeof (SomeObject2); } |
| 24 | + } |
| 25 | + |
| 26 | + internal SomeObject2 (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {} |
| 27 | + |
| 28 | + static IntPtr id_ctor_I; |
| 29 | + // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']/constructor[@name='SomeObject2' and count(parameter)=1 and parameter[1][@type='int']]" |
| 30 | + [Register (".ctor", "(I)V", "")] |
| 31 | + public unsafe SomeObject2 (int aint) |
| 32 | + : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer) |
| 33 | + { |
| 34 | + if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero) |
| 35 | + return; |
| 36 | + |
| 37 | + try { |
| 38 | + JValue* __args = stackalloc JValue [1]; |
| 39 | + __args [0] = new JValue (aint); |
| 40 | + if (((object) this).GetType () != typeof (SomeObject2)) { |
| 41 | + SetHandle ( |
| 42 | + global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(I)V", __args), |
| 43 | + JniHandleOwnership.TransferLocalRef); |
| 44 | + global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(I)V", __args); |
| 45 | + return; |
| 46 | + } |
| 47 | + |
| 48 | + if (id_ctor_I == IntPtr.Zero) |
| 49 | + id_ctor_I = JNIEnv.GetMethodID (class_ref, "<init>", "(I)V"); |
| 50 | + SetHandle ( |
| 51 | + global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_I, __args), |
| 52 | + JniHandleOwnership.TransferLocalRef); |
| 53 | + JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_I, __args); |
| 54 | + } finally { |
| 55 | + } |
| 56 | + } |
| 57 | + |
| 58 | + } |
| 59 | +} |
0 commit comments