Exemplo n.º 1
0
        static IntPtr n_TranslateName_Ljava_lang_reflect_Field_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
        {
            global::Com.Google.Gson.IFieldNamingStrategy __this = global::Java.Lang.Object.GetObject <global::Com.Google.Gson.IFieldNamingStrategy> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Java.Lang.Reflect.Field p0 = global::Java.Lang.Object.GetObject <global::Java.Lang.Reflect.Field> (native_p0, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.NewString(__this.TranslateName(p0));

            return(__ret);
        }
        public unsafe global::Com.Google.Gson.GsonBuilder SetFieldNamingStrategy(global::Com.Google.Gson.IFieldNamingStrategy fieldNamingStrategy)
        {
            const string __id = "setFieldNamingStrategy.(Lcom/google/gson/FieldNamingStrategy;)Lcom/google/gson/GsonBuilder;";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue((fieldNamingStrategy == null) ? IntPtr.Zero : ((global::Java.Lang.Object)fieldNamingStrategy).Handle);
                var __rm = _members.InstanceMethods.InvokeAbstractObjectMethod(__id, this, __args);
                return(global::Java.Lang.Object.GetObject <global::Com.Google.Gson.GsonBuilder> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
            }
        }
Exemplo n.º 3
0
        public unsafe ReflectiveTypeAdapterFactory(global::Com.Google.Gson.Internal.ConstructorConstructor constructorConstructor, global::Com.Google.Gson.IFieldNamingStrategy fieldNamingPolicy, global::Com.Google.Gson.Internal.Excluder excluder, global::Com.Google.Gson.Internal.Bind.JsonAdapterAnnotationTypeAdapterFactory jsonAdapterFactory)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Lcom/google/gson/internal/ConstructorConstructor;Lcom/google/gson/FieldNamingStrategy;Lcom/google/gson/internal/Excluder;Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue((constructorConstructor == null) ? IntPtr.Zero : ((global::Java.Lang.Object)constructorConstructor).Handle);
                __args [1] = new JniArgumentValue((fieldNamingPolicy == null) ? IntPtr.Zero : ((global::Java.Lang.Object)fieldNamingPolicy).Handle);
                __args [2] = new JniArgumentValue((excluder == null) ? IntPtr.Zero : ((global::Java.Lang.Object)excluder).Handle);
                __args [3] = new JniArgumentValue((jsonAdapterFactory == null) ? IntPtr.Zero : ((global::Java.Lang.Object)jsonAdapterFactory).Handle);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
            }
        }