1 package org.simantics.scl.reflection.functions;
3 import java.lang.reflect.InvocationTargetException;
4 import java.lang.reflect.Method;
6 import org.simantics.scl.runtime.function.FunctionImpl3;
8 public class ClassMethodFunction3 extends FunctionImpl3 {
11 public ClassMethodFunction3(Method method) {
15 public Method getMethod() {
20 public Object apply(Object p0, Object p1, Object p2) {
22 return method.invoke(null, p0, p1, p2);
23 } catch (IllegalArgumentException e) {
24 throw new RuntimeException(e);
25 } catch (IllegalAccessException e) {
26 throw new RuntimeException(e);
27 } catch (InvocationTargetException e) {
28 throw new RuntimeException(e.getCause());
33 public String toString() {
34 return method.getName();