Package org.pushingpixels.lafplugin

# Class PluginManager

java.lang.Object
org.pushingpixels.lafplugin.PluginManager

Direct Known Subclasses:
  `ComponentPluginManager`

public class PluginManager extends Object
Plugin manager for look-and-feels.

## Constructor Summary

Constructors
Constructor
Description
`PluginManager(String xmlName, String mainTag, String pluginTag)`
Simple constructor.

## Method Summary

Modifier and Type
Method
Description
`Set`
`getAvailablePlugins()`
Returns a collection of all available plugins.
`Set`
`getAvailablePlugins(boolean toReload)`
Returns a collection of all available plugins.
`protected Object`
`getPlugin(URL pluginUrl)`
`protected String`
`getPluginClass(URL pluginUrl)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PluginManager

public PluginManager(String xmlName, String mainTag, String pluginTag)
Simple constructor.

Parameters:
  `xmlName` - The name of XML file that contains plugin configuration.
  `mainTag` - The main tag in the XML configuration file.
  `pluginTag` - The tag that corresponds to a single plugin kind. Specifies the plugin kind that will be located in `getAvailablePlugins(boolean)`.

## Method Details

### getPluginClass

protected String getPluginClass(URL pluginUrl)

### getPlugin

protected Object getPlugin(URL pluginUrl) throws Exception

Throws:
  `Exception`

### getAvailablePlugins

public Set getAvailablePlugins()
Returns a collection of all available plugins.

Returns:
  Collection of all available plugins. The classpath is scanned only once.
See Also:
  - `getAvailablePlugins(boolean)`

### getAvailablePlugins

public Set getAvailablePlugins(boolean toReload)
Returns a collection of all available plugins. The parameter specifies whether the classpath should be rescanned or whether to return the already found plugins (after first-time scan).

Parameters:
  `toReload` - If `true`, the classpath is scanned for available plugins every time `this` function is called. If `false`, the classpath scan is performed only once. The consecutive calls return the cached result.
Returns:
  Collection of all available plugins.