Browse Source

Pull method DefaultPluginManager.whichPlugin() to PluginManager

pull/346/head
Decebal Suiu 9 years ago
parent
commit
400e0f74bd
  1. 4
      pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java
  2. 6
      pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java

4
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) {

6
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();
}

Loading…
Cancel
Save