aboutsummaryrefslogtreecommitdiffstats
path: root/pf4j
diff options
context:
space:
mode:
Diffstat (limited to 'pf4j')
-rw-r--r--pf4j/src/main/java/org/pf4j/AbstractPluginManager.java5
-rw-r--r--pf4j/src/main/java/org/pf4j/PluginManager.java7
2 files changed, 7 insertions, 5 deletions
diff --git a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
index ba12eef..5803a62 100644
--- a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
+++ b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
@@ -913,11 +913,6 @@ public abstract class AbstractPluginManager implements PluginManager {
}
}
- // TODO add this method in PluginManager as default method for Java 8.
- protected boolean isDevelopment() {
- return RuntimeMode.DEVELOPMENT.equals(getRuntimeMode());
- }
-
/**
* @return true if exact versions in requires is allowed
*/
diff --git a/pf4j/src/main/java/org/pf4j/PluginManager.java b/pf4j/src/main/java/org/pf4j/PluginManager.java
index c2cbacc..11d3eac 100644
--- a/pf4j/src/main/java/org/pf4j/PluginManager.java
+++ b/pf4j/src/main/java/org/pf4j/PluginManager.java
@@ -155,6 +155,13 @@ public interface PluginManager {
RuntimeMode getRuntimeMode();
/**
+ * Returns {@code true} id the runtime mode is {@code RuntimeMode.DEVELOPMENT}.
+ */
+ default boolean isDevelopment() {
+ return RuntimeMode.DEVELOPMENT.equals(getRuntimeMode());
+ }
+
+ /**
* Retrieves the {@link PluginWrapper} that loaded the given class 'clazz'.
*/
PluginWrapper whichPlugin(Class<?> clazz);