From: Decebal Suiu Date: Sat, 26 Dec 2015 21:36:24 +0000 (+0200) Subject: Pull method DefaultPluginManager.whichPlugin() to PluginManager X-Git-Tag: release-0.12.0~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=400e0f74bd054f9e7a47788cd6af85ea9c4721cf;p=pf4j.git Pull method DefaultPluginManager.whichPlugin() to PluginManager --- diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java index 438749b..e3943f2 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java @@ -577,9 +577,7 @@ public class DefaultPluginManager implements PluginManager { return runtimeMode; } - /** - * Retrieves the {@link PluginWrapper} that loaded the given class 'clazz'. - */ + @Override public PluginWrapper whichPlugin(Class clazz) { ClassLoader classLoader = clazz.getClassLoader(); for (PluginWrapper plugin : resolvedPlugins) { diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java b/pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java index 2114b8c..9792979 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java @@ -141,6 +141,11 @@ public interface PluginManager { */ public RuntimeMode getRuntimeMode(); + /** + * Retrieves the {@link PluginWrapper} that loaded the given class 'clazz'. + */ + public PluginWrapper whichPlugin(Class clazz); + public void addPluginStateListener(PluginStateListener listener); public void removePluginStateListener(PluginStateListener listener); @@ -161,4 +166,5 @@ public interface PluginManager { * * @return the system version */ public Version getSystemVersion(); + }