mirror of
https://github.com/RayzsYT/ProAntiTab.git
synced 2026-12-02 05:19:52 -05:00
Add Method
This commit is contained in:
1 parent
bcb28d041b
commit
02ac754e51
1 file changed
+14
@@ -148,6 +148,20 @@ public class Reflection {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Method getMethodByName(Object obj, String name) {
|
||||
Method method = null;
|
||||
try { method = obj.getClass().getDeclaredMethod(name);
|
||||
} catch (Exception ignored) { }
|
||||
return method;
|
||||
}
|
||||
|
||||
public static Method getMethodByName(Class<?> clazz, String name) {
|
||||
Method method = null;
|
||||
try { method = clazz.getDeclaredMethod(name);
|
||||
} catch (Exception ignored) { }
|
||||
return method;
|
||||
}
|
||||
|
||||
public static List<Method> getMethodsByParameterAndName(Object obj, String name, Class<?>... parameterTypes) {
|
||||
return getMethodsByParameterAndName(obj.getClass(), name, parameterTypes);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user