// create the plugin wrapper
log.debug("Creating wrapper for plugin '{}'", pluginPath);
- PluginWrapper pluginWrapper = new PluginWrapper(pluginDescriptor, pluginPath, pluginClassLoader);
+ PluginWrapper pluginWrapper = new PluginWrapper(this, pluginDescriptor, pluginPath, pluginClassLoader);
pluginWrapper.setPluginFactory(pluginFactory);
pluginWrapper.setRuntimeMode(getRuntimeMode());
*/
public class PluginWrapper {
+ PluginManager pluginManager;
PluginDescriptor descriptor;
String pluginPath;
PluginClassLoader pluginClassLoader;
RuntimeMode runtimeMode;
Plugin plugin; // cache
- public PluginWrapper(PluginDescriptor descriptor, String pluginPath, PluginClassLoader pluginClassLoader) {
+ public PluginWrapper(PluginManager pluginManager, PluginDescriptor descriptor, String pluginPath, PluginClassLoader pluginClassLoader) {
+ this.pluginManager = pluginManager;
this.descriptor = descriptor;
this.pluginPath = pluginPath;
this.pluginClassLoader = pluginClassLoader;
pluginState = PluginState.CREATED;
}
+ /**
+ * Returns the plugin manager.
+ */
+ public PluginManager getPluginManager() {
+ return pluginManager;
+ }
+
/**
* Returns the plugin descriptor.
*/