/// <summary>
 /// Try to find a method by its name and descriptor.
 /// </summary>
 public bool TryGetMethod(IClassLoader classLoader, Action<ClassFile> classLoaded, string name, string signature, out DexImportMethod method)
 {
     var cf = Resolve(classLoader, classLoaded, null);
     signature = Descriptors.StripMethodReturnType(signature);
     foreach (var importMethod in dexMethods)
     {
         var javaMethod = importMethod.Resolve(cf);
         if ((javaMethod.Name == name) && (Descriptors.StripMethodReturnType(javaMethod.Descriptor) == signature))
         {
             method = importMethod;
             return true;
         }
     }
     method = null;
     return false;
 }
Exemplo n.º 2
0
            /// <summary>
            /// Try to find a method by its name and descriptor.
            /// </summary>
            public bool TryGetMethod(IClassLoader classLoader, Action <ClassFile> classLoaded, string name, string signature, out DexImportMethod method)
            {
                var cf = Resolve(classLoader, classLoaded, null);

                signature = Descriptors.StripMethodReturnType(signature);
                foreach (var importMethod in dexMethods)
                {
                    var javaMethod = importMethod.Resolve(cf);
                    if ((javaMethod.Name == name) && (Descriptors.StripMethodReturnType(javaMethod.Descriptor) == signature))
                    {
                        method = importMethod;
                        return(true);
                    }
                }
                method = null;
                return(false);
            }