GetStaticMethodID() public static method

public static GetStaticMethodID ( IntPtr clazz, string name, string sig ) : IntPtr
clazz System.IntPtr
name string
sig string
return System.IntPtr
        private static IntPtr GetStaticMethodID(string clazz, string methodName, string signature)
        {
            IntPtr num = AndroidJNISafe.FindClass(clazz);

            try
            {
                return(AndroidJNISafe.GetStaticMethodID(num, methodName, signature));
            }
            finally
            {
                AndroidJNISafe.DeleteLocalRef(num);
            }
        }
        private static IntPtr GetStaticMethodID(string clazz, string methodName, string signature)
        {
            IntPtr intPtr = AndroidJNISafe.FindClass(clazz);
            IntPtr staticMethodID;

            try
            {
                staticMethodID = AndroidJNISafe.GetStaticMethodID(intPtr, methodName, signature);
            }
            finally
            {
                AndroidJNISafe.DeleteLocalRef(intPtr);
            }
            return(staticMethodID);
        }
Esempio n. 3
0
 private static IntPtr GetMethodIDFallback(IntPtr jclass, string methodName, string signature, bool isStatic)
 {
     try
     {
         return((!isStatic) ? AndroidJNISafe.GetMethodID(jclass, methodName, signature) : AndroidJNISafe.GetStaticMethodID(jclass, methodName, signature));
     }
     catch (Exception)
     {
     }
     return(IntPtr.Zero);
 }
Esempio n. 4
0
        public static IntPtr GetMethodID(IntPtr jclass, string methodName, string signature, bool isStatic)
        {
            IntPtr ptr3;
            IntPtr zero = IntPtr.Zero;

            try
            {
                zero = AndroidReflection.GetMethodMember(jclass, methodName, signature, isStatic);
                ptr3 = AndroidJNISafe.FromReflectedMethod(zero);
            }
            catch (Exception exception)
            {
                IntPtr ptr2 = !isStatic?AndroidJNISafe.GetMethodID(jclass, methodName, signature) : AndroidJNISafe.GetStaticMethodID(jclass, methodName, signature);

                if (ptr2 == IntPtr.Zero)
                {
                    throw exception;
                }
                return(ptr2);
            }
            finally
            {
                AndroidJNISafe.DeleteLocalRef(zero);
            }
            return(ptr3);
        }
        public static IntPtr GetMethodID(IntPtr jclass, string methodName, string signature, bool isStatic)
        {
            IntPtr intPtr = IntPtr.Zero;
            IntPtr result;

            try
            {
                intPtr = AndroidReflection.GetMethodMember(jclass, methodName, signature, isStatic);
                result = AndroidJNISafe.FromReflectedMethod(intPtr);
            }
            catch (Exception ex)
            {
                IntPtr intPtr2 = (!isStatic) ? AndroidJNISafe.GetMethodID(jclass, methodName, signature) : AndroidJNISafe.GetStaticMethodID(jclass, methodName, signature);
                if (!(intPtr2 != IntPtr.Zero))
                {
                    throw ex;
                }
                result = intPtr2;
            }
            finally
            {
                AndroidJNISafe.DeleteLocalRef(intPtr);
            }
            return(result);
        }