BioLegato 0.7.3 Core API

org.biolegato.core.plugins
Class PluginLoader

java.lang.Object
  extended by org.biolegato.core.plugins.PluginLoader

public class PluginLoader
extends java.lang.Object

This class is used to handle plugins.

Author:
Graham Alvare, Brian Fristensky

Constructor Summary
PluginLoader(java.lang.String directory)
          Loads an the plugins into BioLegato.
 
Method Summary
 PluginWrapper getPlugin(java.lang.String string)
          Retrieves a plugin by name.
 java.util.Map<java.lang.String,PluginWrapper> getPluginHash()
          Maintains a list with all of the plugins loaded by BioLegato.
 java.util.Collection<PluginWrapper> getPlugins(java.lang.Class<?> type)
          Returns a list with all of the plugins loaded by BioLegato that are instances of the class type indicated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginLoader

public PluginLoader(java.lang.String directory)
Loads an the plugins into BioLegato.

Parameters:
directory - the directory to load the plugins from
Method Detail

getPluginHash

public java.util.Map<java.lang.String,PluginWrapper> getPluginHash()
Maintains a list with all of the plugins loaded by BioLegato.

Returns:
a list containing all of the plugins loaded

getPlugins

public java.util.Collection<PluginWrapper> getPlugins(java.lang.Class<?> type)
Returns a list with all of the plugins loaded by BioLegato that are instances of the class type indicated.

Parameters:
type - the plugin type to find
Returns:
a list containing all of the plugins loaded

getPlugin

public PluginWrapper getPlugin(java.lang.String string)
Retrieves a plugin by name. This can be used for plugins dependant on other plugins

Parameters:
string - the plugin to retrieve
Returns:
the plugin requested (null on failure)

BioLegato 0.7.3 Core API

Copyright © 2008-2010 University of Manitoba.