MCPcopy Index your code
hub / github.com/ccxt/ccxt / callDynamicallyAsync

Method callDynamicallyAsync

java/lib/src/main/java/io/github/ccxt/Helpers.java:750–764  ·  view source on GitHub ↗
(Object obj, Object methodName, Object[] args)

Source from the content-addressed store, hash-verified

748}
749
750 public static Object callDynamicallyAsync(Object obj, Object methodName, Object[] args) {
751 if (args == null) args = new Object[]{};
752 String name = (String) methodName;
753 Method m = findMethod(obj.getClass(), name, args.length);
754 try {
755 m.setAccessible(true);
756 Object res = m.invoke(obj, args);
757 if (res instanceof CompletableFuture) {
758 return ((CompletableFuture<?>) res).get();
759 }
760 return res;
761 } catch (Exception e) {
762 throw new RuntimeException(e);
763 }
764 }
765
766 public static boolean inOp(Object obj, Object key) { return InOp(obj, key); }
767

Callers

nothing calls this directly

Calls 2

findMethodMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected