1 package org.simantics.scl.reflection.internal.registry;
3 import java.lang.reflect.Method;
5 import org.osgi.framework.Bundle;
7 public class ExternalMethod {
8 public final Bundle bundle;
9 public final String className;
10 public final String methodName;
11 public final String alternativeName;
13 public ExternalMethod(Bundle bundle, String className, String methodName,
14 String alternativeName) {
16 this.className = className;
17 this.methodName = methodName;
18 this.alternativeName = alternativeName;
21 public Class<?> loadClass() {
23 return bundle.loadClass(className);
24 } catch (ClassNotFoundException e) {
29 public Method getMethod(Class<?> clazz) {
30 for(Method method : clazz.getMethods())
31 if(method.getName().equals(methodName))