add getMethods

pull/46/head
Milk 3 years ago
parent 24a5a78dc4
commit 07e25ef1df
  1. 15
      Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java

@ -160,7 +160,20 @@ public class VMCore {
} }
} }
Method[] declaredMethods = aClass.getDeclaredMethods(); try {
Method[] declaredMethods = aClass.getDeclaredMethods();
for (Method declaredMethod : declaredMethods) {
if (declaredMethod.getName().equals(methodName)) {
String desc = MethodUtils.getDesc(declaredMethod);
if (desc.equals(signature)) {
return declaredMethod;
}
}
}
} catch (Throwable ignored) {
}
Method[] declaredMethods = aClass.getMethods();
for (Method declaredMethod : declaredMethods) { for (Method declaredMethod : declaredMethods) {
if (declaredMethod.getName().equals(methodName)) { if (declaredMethod.getName().equals(methodName)) {
String desc = MethodUtils.getDesc(declaredMethod); String desc = MethodUtils.getDesc(declaredMethod);

Loading…
Cancel
Save