Skip to content

Commit

Permalink
修复一个小Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkeylord committed Jul 24, 2019
1 parent 2b9a4c8 commit a8be482
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/java/monkeylord/XServer/api/MethodView.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import monkeylord.XServer.handler.ClassHandler;
import monkeylord.XServer.handler.MethodHandler;
import monkeylord.XServer.handler.ObjectHandler;
import monkeylord.XServer.utils.Utils;

//查看方法详情页面
public class MethodView implements XServer.Operation {
Expand All @@ -18,6 +19,11 @@ public String handle(String url, Map<String, String> parms, Map<String, String>
Method method=null;
if(parms.get("javaname")!=null) {
method = MethodHandler.getMethodbyJavaName(parms.get("javaname"));
for (int i = 0; i < method.getDeclaringClass().getDeclaredMethods().length; i++) {
if(Utils.getJavaName(method.getDeclaringClass().getDeclaredMethods()[i]).equals(parms.get("javaname"))){
parms.put("method",""+i);
}
}
}
if(method==null)method=ClassHandler.findClassbyName(parms.get("class"),XposedEntry.classLoader).getDeclaredMethods()[Integer.parseInt(parms.get("method"))];
HashMap<String, Object> map = MethodHandler.getMethodDetail(method);
Expand Down

0 comments on commit a8be482

Please sign in to comment.