summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2016-03-28 19:58:40 +0300
committerDecebal Suiu <decebal.suiu@gmail.com>2016-03-28 19:58:40 +0300
commit33706d534c8f6b7ac6cce62e5dfb205805ae01b4 (patch)
tree4747b41f444a0836a4c28f3d3977603d08fe8efb
parenta866af82241692825139e57508a93366e0ca85a6 (diff)
downloadpf4j-33706d534c8f6b7ac6cce62e5dfb205805ae01b4.tar.gz
pf4j-33706d534c8f6b7ac6cce62e5dfb205805ae01b4.zip
Add helper DefaultExtensionFinder.addServiceProviderExtensionFinder
-rw-r--r--pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFinder.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFinder.java
index fff72a4..66fb952 100644
--- a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFinder.java
+++ b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFinder.java
@@ -28,9 +28,14 @@ import java.util.Set;
*/
public class DefaultExtensionFinder implements ExtensionFinder, PluginStateListener {
+ protected PluginManager pluginManager;
protected List<ExtensionFinder> finders = new ArrayList<>();
public DefaultExtensionFinder(PluginManager pluginManager) {
+ this.pluginManager = pluginManager;
+
+ finders = new ArrayList<>();
+
addExtensionFinder(new LegacyExtensionFinder(pluginManager));
// addExtensionFinder(new ServiceProviderExtensionFinder(pluginManager));
}
@@ -64,6 +69,10 @@ public class DefaultExtensionFinder implements ExtensionFinder, PluginStateListe
}
}
+ public DefaultExtensionFinder addServiceProviderExtensionFinder() {
+ return addExtensionFinder(new ServiceProviderExtensionFinder(pluginManager));
+ }
+
public DefaultExtensionFinder addExtensionFinder(ExtensionFinder finder) {
finders.add(finder);