X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.reflection%2Fsrc%2Forg%2Fsimantics%2Fscl%2Freflection%2Ffunctions%2FClassMethodFunction3.java;h=6f92b9465961ad324ff937698f138312336bb068;hb=refs%2Fchanges%2F38%2F238%2F2;hp=fcad12f1b7da2bebaecc2446d92ca8b96ed32c95;hpb=b35573372259ace60d8827766fe41443f4c57629;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/functions/ClassMethodFunction3.java b/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/functions/ClassMethodFunction3.java index fcad12f1b..6f92b9465 100644 --- a/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/functions/ClassMethodFunction3.java +++ b/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/functions/ClassMethodFunction3.java @@ -1,36 +1,36 @@ -package org.simantics.scl.reflection.functions; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.simantics.scl.runtime.function.FunctionImpl3; - -public class ClassMethodFunction3 extends FunctionImpl3 { - Method method; - - public ClassMethodFunction3(Method method) { - this.method = method; - } - - public Method getMethod() { - return method; - } - - @Override - public Object apply(Object p0, Object p1, Object p2) { - try { - return method.invoke(null, p0, p1, p2); - } catch (IllegalArgumentException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { - throw new RuntimeException(e.getCause()); - } - } - - @Override - public String toString() { - return method.getName(); - } -} +package org.simantics.scl.reflection.functions; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import org.simantics.scl.runtime.function.FunctionImpl3; + +public class ClassMethodFunction3 extends FunctionImpl3 { + Method method; + + public ClassMethodFunction3(Method method) { + this.method = method; + } + + public Method getMethod() { + return method; + } + + @Override + public Object apply(Object p0, Object p1, Object p2) { + try { + return method.invoke(null, p0, p1, p2); + } catch (IllegalArgumentException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + @Override + public String toString() { + return method.getName(); + } +}