MCPcopy Index your code
hub / github.com/cschanck/single-file-java / invoke

Method invoke

src/main/java/org/sfj/ProxyMe.java:267–278  ·  view source on GitHub ↗

Invoke the Invocation on the instance object, returning the InvocationReturn object. @param invocation Invocation @param Return type @return InvocationReturn

(Invocation invocation)

Source from the content-addressed store, hash-verified

265 * @return InvocationReturn
266 */
267 @SuppressWarnings("unchecked")
268 public <R> InvocationReturn<R> invoke(Invocation invocation) {
269 Method m = methods.get(invocation.methodName);
270 R ret = null;
271 Throwable throwable = null;
272 try {
273 ret = (R) m.invoke(instance, invocation.args);
274 } catch (Throwable e) {
275 throwable = e;
276 }
277 return new InvocationReturn<>(invocation.iid, ret, throwable);
278 }
279 }
280}

Callers 3

testSimpleMethod · 0.95
testMapMethod · 0.95

Calls 1

getMethod · 0.65

Tested by 3

testSimpleMethod · 0.76
testMapMethod · 0.76