|
|
@ -85,7 +85,7 @@ public class DefaultPluginManager implements PluginManager { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* A compound class loader of resolved plugins. |
|
|
|
* A compound class loader of resolved plugins. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private CompoundClassLoader compoundClassLoader; |
|
|
|
protected CompoundClassLoader compoundClassLoader; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Th plugins directory is supplied by System.getProperty("pf4j.pluginsDir", "plugins"). |
|
|
|
* Th plugins directory is supplied by System.getProperty("pf4j.pluginsDir", "plugins"). |
|
|
@ -110,19 +110,20 @@ public class DefaultPluginManager implements PluginManager { |
|
|
|
resolvedPlugins = new ArrayList<PluginWrapper>(); |
|
|
|
resolvedPlugins = new ArrayList<PluginWrapper>(); |
|
|
|
disabledPlugins = new ArrayList<PluginWrapper>(); |
|
|
|
disabledPlugins = new ArrayList<PluginWrapper>(); |
|
|
|
startedPlugins = new ArrayList<PluginWrapper>(); |
|
|
|
startedPlugins = new ArrayList<PluginWrapper>(); |
|
|
|
pluginDescriptorFinder = new DefaultPluginDescriptorFinder(); |
|
|
|
|
|
|
|
compoundClassLoader = new CompoundClassLoader(); |
|
|
|
compoundClassLoader = new CompoundClassLoader(); |
|
|
|
extensionFinder = new DefaultExtensionFinder(compoundClassLoader); |
|
|
|
|
|
|
|
|
|
|
|
pluginDescriptorFinder = createPluginDescriptorFinder(); |
|
|
|
|
|
|
|
extensionFinder = createExtensionFinder(); |
|
|
|
|
|
|
|
|
|
|
|
System.setProperty("pf4j.pluginsDir", pluginsDirectory.getAbsolutePath()); |
|
|
|
System.setProperty("pf4j.pluginsDir", pluginsDirectory.getAbsolutePath()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public PluginDescriptorFinder getPluginDescriptorFinder() { |
|
|
|
protected PluginDescriptorFinder createPluginDescriptorFinder() { |
|
|
|
return pluginDescriptorFinder; |
|
|
|
return new DefaultPluginDescriptorFinder(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setPluginDescriptorFinder(PluginDescriptorFinder pluginDescriptorFinder) { |
|
|
|
protected ExtensionFinder createExtensionFinder() { |
|
|
|
this.pluginDescriptorFinder = pluginDescriptorFinder; |
|
|
|
return new DefaultExtensionFinder(compoundClassLoader); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|