From ef278f6db6993bab3d6a44b881e3fd6267a58995 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Sch=C3=BCth?= Date: Fri, 12 Jul 2019 14:52:05 +0200 Subject: [PATCH] Make AbstractPluginManager fields protected to allow better control in custom plugin managers (#330) --- .../java/org/pf4j/AbstractPluginManager.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java index 6bd6170..e69acd3 100644 --- a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java +++ b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java @@ -51,11 +51,11 @@ public abstract class AbstractPluginManager implements PluginManager { public static final String DEFAULT_PLUGINS_DIR = "plugins"; public static final String DEVELOPMENT_PLUGINS_DIR = "../plugins"; - private Path pluginsRoot; + protected Path pluginsRoot; protected ExtensionFinder extensionFinder; - private PluginDescriptorFinder pluginDescriptorFinder; + protected PluginDescriptorFinder pluginDescriptorFinder; /** * A map of plugins this manager is responsible for (the key is the 'pluginId'). @@ -65,48 +65,48 @@ public abstract class AbstractPluginManager implements PluginManager { /** * A map of plugin class loaders (the key is the 'pluginId'). */ - private Map pluginClassLoaders; + protected Map pluginClassLoaders; /** * A list with unresolved plugins (unresolved dependency). */ - private List unresolvedPlugins; + protected List unresolvedPlugins; /** * A list with all resolved plugins (resolved dependency). */ - private List resolvedPlugins; + protected List resolvedPlugins; /** * A list with started plugins. */ - private List startedPlugins; + protected List startedPlugins; /** * The registered {@link PluginStateListener}s. */ - private List pluginStateListeners; + protected List pluginStateListeners; /** * Cache value for the runtime mode. * No need to re-read it because it wont change at runtime. */ - private RuntimeMode runtimeMode; + protected RuntimeMode runtimeMode; /** * The system version used for comparisons to the plugin requires attribute. */ - private String systemVersion = "0.0.0"; + protected String systemVersion = "0.0.0"; - private PluginRepository pluginRepository; - private PluginFactory pluginFactory; - private ExtensionFactory extensionFactory; - private PluginStatusProvider pluginStatusProvider; - private DependencyResolver dependencyResolver; - private PluginLoader pluginLoader; - private boolean exactVersionAllowed = false; + protected PluginRepository pluginRepository; + protected PluginFactory pluginFactory; + protected ExtensionFactory extensionFactory; + protected PluginStatusProvider pluginStatusProvider; + protected DependencyResolver dependencyResolver; + protected PluginLoader pluginLoader; + protected boolean exactVersionAllowed = false; - private VersionManager versionManager; + protected VersionManager versionManager; /** * The plugins root is supplied by {@code System.getProperty("pf4j.pluginsDir", "plugins")}. -- 2.39.5