]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/functions/InstanceMethodFunction.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.reflection / src / org / simantics / scl / reflection / functions / InstanceMethodFunction.java
old mode 100755 (executable)
new mode 100644 (file)
index fa729ea..2899473
@@ -1,38 +1,38 @@
-package org.simantics.scl.reflection.functions;\r
-\r
-import java.lang.reflect.InvocationTargetException;\r
-import java.lang.reflect.Method;\r
-import java.util.Arrays;\r
-\r
-import org.simantics.scl.runtime.function.FunctionImplN;\r
-\r
-public class InstanceMethodFunction extends FunctionImplN {\r
-    Method method;\r
-\r
-    public InstanceMethodFunction(Method method) {\r
-        super(method.getParameterTypes().length+1);\r
-        this.method = method;\r
-    }\r
-    \r
-    public Method getMethod() {\r
-        return method;\r
-    }\r
-\r
-    @Override\r
-    public Object doApply(Object... ps) {\r
-        try {\r
-            return method.invoke(ps[0], Arrays.copyOfRange(ps, 1, ps.length));\r
-        } catch (IllegalArgumentException e) {\r
-            throw new RuntimeException(e);\r
-        } catch (IllegalAccessException e) {\r
-            throw new RuntimeException(e);\r
-        } catch (InvocationTargetException e) {\r
-            throw new RuntimeException(e.getCause());\r
-        }\r
-    }\r
-    \r
-    @Override\r
-    public String toString() {\r
-        return method.getName();\r
-    }\r
-}\r
+package org.simantics.scl.reflection.functions;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+import org.simantics.scl.runtime.function.FunctionImplN;
+
+public class InstanceMethodFunction extends FunctionImplN {
+    Method method;
+
+    public InstanceMethodFunction(Method method) {
+        super(method.getParameterTypes().length+1);
+        this.method = method;
+    }
+    
+    public Method getMethod() {
+        return method;
+    }
+
+    @Override
+    public Object doApply(Object... ps) {
+        try {
+            return method.invoke(ps[0], Arrays.copyOfRange(ps, 1, ps.length));
+        } 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();
+    }
+}