MCPcopy Create free account
hub / github.com/baidu/openrasp / invokeStaticMethod

Method invokeStaticMethod

rasp-install/java/src/test/java/Utils.java:9–16  ·  view source on GitHub ↗
(String className, String methodName, Class[] paramTypes, Object... parameters)

Source from the content-addressed store, hash-verified

7public class Utils {
8
9 public static Object invokeStaticMethod(String className, String methodName, Class[] paramTypes, Object... parameters) {
10 try {
11 Class clazz = Class.forName(className);
12 return invokeMethod(null, clazz, methodName, paramTypes, parameters);
13 } catch (Exception e) {
14 return null;
15 }
16 }
17
18 public static String invokeStringMethod(Object object, String methodName, Class[] paramTypes, Object... parameters) {
19 Object ret = invokeMethod(object, methodName, paramTypes, parameters);

Callers 4

testCheckArgsMethod · 0.95
testShowNoticeMethod · 0.95
testFindFileMethod · 0.95

Calls 1

invokeMethodMethod · 0.95

Tested by

no test coverage detected