plugin/src/java/org/pm4knime/util/connectors/prom/PM4KNIMEPluginManager.java
private String loadClass(ClassLoader loader, URL url, String className, PackageDescriptor pack) {
		boolean isAnnotated = false;

		if ((className == null) || className.trim().equals("") || className.startsWith("bin-test-instrument")) {
			return null;
		}

		className = className.trim();
		try {
			Class<?> pluginClass = Class.forName(className, false, loader);
			// isAnnotated = (pluginClass.getAnnotations().length > 0);

			// register all annotated classes
			if (pluginClass.isAnnotationPresent(KeepInProMCache.class)
					&& !Modifier.isAbstract(pluginClass.getModifiers())) {
				Annotation[] annotations = pluginClass.getAnnotations();
				isAnnotated = true;
				for (int i = 0; i < annotations.length; i++) {
					Set<Class<?>> set = annotatedClasses.get(annotations[i].annotationType());
					if (set == null) {
						set = new HashSet<Class<?>>();
						annotatedClasses.put(annotations[i].annotationType(), set);
					}
					set.add(pluginClass);
				}
			}

			Method[] methods = pluginClass.getMethods();
			// Check if plugin annotation is present
			if (pluginClass.isAnnotationPresent(Plugin.class) && isGoodPlugin(pluginClass, methods)) {
				PM4KNIMEPluginDescriptor pl = new PM4KNIMEPluginDescriptor(pluginClass, pluginContextType, pack);
				addPlugin(pl);
				isAnnotated = true;
			}

			for (Method method : methods) {
				if (method.isAnnotationPresent(Plugin.class) && isGoodPlugin(method)) {
					try {
						PM4KNIMEPluginDescriptor pl = new PM4KNIMEPluginDescriptor(method, pack);
						addPlugin(pl);
						isAnnotated = true;
					} catch (Exception e) {
						fireError(url, e, className);
						if (Boot.VERBOSE != Level.NONE) {
							System.err.println("ERROR while adding plugin: " + url + ":" + e.getMessage());
						}
					}
				}
			}
		} catch (Throwable t) {
			System.out.println(t.getMessage());
			fireError(url, t, className);
			if (Boot.VERBOSE != Level.NONE) {
				System.err.println("ERROR while scanning for plugins at: " + url + ":");
				System.err.println("   in file :" + className);
				System.err.println("   " + t.getMessage());
				// t.printStackTrace();
			}
		}
		return isAnnotated ? className : null;
	}
/**
	 * Returns the name of the class, if it is annotated, or if any of its
	 * methods carries a plugin annotation!
	 * 
	 * @param loader
	 * @param url
	 * @param className
	 * @return
	 */
Returns the name of the class, if it is annotated, or if any of its
methods carries a plugin annotation!


Returns the name of the class if it is annotated or if any of its methods carries a plugin annotation!
private String loadClass(ClassLoader loader, URL url, String className, PackageDescriptor pack) {
		boolean isAnnotated = false;
		if ((className == null) || className.trim().equals("") || className.startsWith("bin-test-instrument")) {
			return null;
		}
		className = className.trim();
		try {
			Class<?> pluginClass = Class.forName(className, false, loader);
			if (pluginClass.isAnnotationPresent(KeepInProMCache.class)
					&& !Modifier.isAbstract(pluginClass.getModifiers())) {
				Annotation[] annotations = pluginClass.getAnnotations();
				isAnnotated = true;
				for (int i = 0; i < annotations.length; i++) {
					Set<Class<?>> set = annotatedClasses.get(annotations[i].annotationType());
					if (set == null) {
						set = new HashSet<Class<?>>();
						annotatedClasses.put(annotations[i].annotationType(), set);
					}
					set.add(pluginClass);
				}
			}
			Method[] methods = pluginClass.getMethods();
			if (pluginClass.isAnnotationPresent(Plugin.class) && isGoodPlugin(pluginClass, methods)) {
				PM4KNIMEPluginDescriptor pl = new PM4KNIMEPluginDescriptor(pluginClass, pluginContextType, pack);
				addPlugin(pl);
				isAnnotated = true;
			}
			for (Method method : methods) {
				if (method.isAnnotationPresent(Plugin.class) && isGoodPlugin(method)) {
					try {
						PM4KNIMEPluginDescriptor pl = new PM4KNIMEPluginDescriptor(method, pack);
						addPlugin(pl);
						isAnnotated = true;
					} catch (Exception e) {
						fireError(url, e, className);
						if (Boot.VERBOSE != Level.NONE) {
							System.err.println("ERROR while adding plugin: " + url + ":" + e.getMessage());
						}
					}
				}
			}
		} catch (Throwable t) {
			System.out.println(t.getMessage());
			fireError(url, t, className);
			if (Boot.VERBOSE != Level.NONE) {
				System.err.println("ERROR while scanning for plugins at: " + url + ":");
				System.err.println("   in file :" + className);
				System.err.println("   " + t.getMessage());
			}
		}
		return isAnnotated ? className : null;
	}
private String loadClass ( ClassLoader loader , URL url , String className , PackageDescriptor pack ) { boolean isAnnotated = false ; if ( ( className == null ) || className . trim ( ) . equals ( "" ) || className . startsWith ( "bin-test-instrument" ) ) { return null ; } className = className . trim ( ) ; try { Class < ? > pluginClass = Class . forName ( className , false , loader ) ; if ( pluginClass . isAnnotationPresent ( KeepInProMCache . class ) && ! Modifier . isAbstract ( pluginClass . getModifiers ( ) ) ) { Annotation [ ] annotations = pluginClass . getAnnotations ( ) ; isAnnotated = true ; for ( int i = 0 ; i < annotations . length ; i ++ ) { Set < Class < ? > > set = annotatedClasses . get ( annotations [ i ] . annotationType ( ) ) ; if ( set == null ) { set = new HashSet < Class < ? > > ( ) ; annotatedClasses . put ( annotations [ i ] . annotationType ( ) , set ) ; } set . add ( pluginClass ) ; } } Method [ ] methods = pluginClass . getMethods ( ) ; if ( pluginClass . isAnnotationPresent ( Plugin . class ) && isGoodPlugin ( pluginClass , methods ) ) { PM4KNIMEPluginDescriptor pl = new PM4KNIMEPluginDescriptor ( pluginClass , pluginContextType , pack ) ; addPlugin ( pl ) ; isAnnotated = true ; } for ( Method method : methods ) { if ( method . isAnnotationPresent ( Plugin . class ) && isGoodPlugin ( method ) ) { try { PM4KNIMEPluginDescriptor pl = new PM4KNIMEPluginDescriptor ( method , pack ) ; addPlugin ( pl ) ; isAnnotated = true ; } catch ( Exception e ) { fireError ( url , e , className ) ; if ( Boot . VERBOSE != Level . NONE ) { System . err . println ( "ERROR while adding plugin: " + url + ":" + e . getMessage ( ) ) ; } } } } } catch ( Throwable t ) { System . out . println ( t . getMessage ( ) ) ; fireError ( url , t , className ) ; if ( Boot . VERBOSE != Level . NONE ) { System . err . println ( "ERROR while scanning for plugins at: " + url + ":" ) ; System . err . println ( "   in file :" + className ) ; System . err . println ( "   " + t . getMessage ( ) ) ; } } return isAnnotated ? className : null ; }
Returns the name of the class, if it is annotated, or if any of its
 methods carries a plugin annotation!
Returns the name of the class if it is annotated or if any of its methods carries a plugin annotation!
// isAnnotated = (pluginClass.getAnnotations().length > 0); // register all annotated classes // Check if plugin annotation is present // t.printStackTrace();