weka.gui.beans
Class PluginManager

java.lang.Object
  extended by weka.gui.beans.PluginManager

public class PluginManager
extends Object

Class that manages a global map of plugins. The knowledge flow uses this to manage plugins other than step components and perspectives. Is general purpose, so can be used by other Weka components. Provides static methods for registering and instantiating plugins.

Version:
$Revision: 8034 $
Author:
Mark Hall (mhall{[at]}pentaho{[dot]}com)

Constructor Summary
PluginManager()
           
 
Method Summary
static void addPlugin(String interfaceName, String name, String concreteType)
          Add a plugin.
static Object getPluginInstance(String interfaceType, String name)
          Get an instance of a concrete implementation of a plugin type
static Set<String> getPluginNamesOfType(String interfaceName)
          Get a set of names of plugins that implement the supplied interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginManager

public PluginManager()
Method Detail

getPluginNamesOfType

public static Set<String> getPluginNamesOfType(String interfaceName)
Get a set of names of plugins that implement the supplied interface.

Parameters:
interfaceName - the fully qualified name of the interface to list plugins for
Returns:
a set of names of plugins

addPlugin

public static void addPlugin(String interfaceName,
                             String name,
                             String concreteType)
Add a plugin.

Parameters:
interfaceName - the fully qualified interface name that the plugin implements
name - the name/short description of the plugin
concreteType - the fully qualified class name of the actual concrete implementation

getPluginInstance

public static Object getPluginInstance(String interfaceType,
                                       String name)
                                throws Exception
Get an instance of a concrete implementation of a plugin type

Parameters:
interfaceType - the fully qualified interface name of the plugin type
name - the name/short description of the plugin to get
Returns:
the concrete plugin
Throws:
Exception - if the plugin can't be found or instantiated


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.