X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.reflection%2Fsrc%2Forg%2Fsimantics%2Fscl%2Freflection%2Finternal%2Fregistry%2FExternalMethod.java;h=706e22ed14cc87e372b8a2b839b6d2cfb3222a3d;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=582c0cfa6a7990a9707365b5c494cc2775c4d6b9;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/registry/ExternalMethod.java b/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/registry/ExternalMethod.java old mode 100755 new mode 100644 index 582c0cfa6..706e22ed1 --- a/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/registry/ExternalMethod.java +++ b/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/registry/ExternalMethod.java @@ -1,35 +1,35 @@ -package org.simantics.scl.reflection.internal.registry; - -import java.lang.reflect.Method; - -import org.osgi.framework.Bundle; - -public class ExternalMethod { - public final Bundle bundle; - public final String className; - public final String methodName; - public final String alternativeName; - - public ExternalMethod(Bundle bundle, String className, String methodName, - String alternativeName) { - this.bundle = bundle; - this.className = className; - this.methodName = methodName; - this.alternativeName = alternativeName; - } - - public Class loadClass() { - try { - return bundle.loadClass(className); - } catch (ClassNotFoundException e) { - return null; - } - } - - public Method getMethod(Class clazz) { - for(Method method : clazz.getMethods()) - if(method.getName().equals(methodName)) - return method; - return null; - } -} +package org.simantics.scl.reflection.internal.registry; + +import java.lang.reflect.Method; + +import org.osgi.framework.Bundle; + +public class ExternalMethod { + public final Bundle bundle; + public final String className; + public final String methodName; + public final String alternativeName; + + public ExternalMethod(Bundle bundle, String className, String methodName, + String alternativeName) { + this.bundle = bundle; + this.className = className; + this.methodName = methodName; + this.alternativeName = alternativeName; + } + + public Class loadClass() { + try { + return bundle.loadClass(className); + } catch (ClassNotFoundException e) { + return null; + } + } + + public Method getMethod(Class clazz) { + for(Method method : clazz.getMethods()) + if(method.getName().equals(methodName)) + return method; + return null; + } +}