*/
package org.pf4j;
+import org.pf4j.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.Closeable;
import java.io.IOException;
import java.nio.file.Files;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.pf4j.util.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* This class implements the boilerplate plugin code that any {@link PluginManager}
log.debug("Creating wrapper for plugin '{}'", pluginPath);
PluginWrapper pluginWrapper = new PluginWrapper(this, pluginDescriptor, pluginPath, pluginClassLoader);
pluginWrapper.setPluginFactory(getPluginFactory());
- pluginWrapper.setRuntimeMode(getRuntimeMode());
// test for disabled plugin
if (isPluginDisabled(pluginDescriptor.getPluginId())) {
this.pluginClassLoader = pluginClassLoader;
pluginState = PluginState.CREATED;
+ runtimeMode = pluginManager.getRuntimeMode();
}
/**
this.pluginState = pluginState;
}
- void setRuntimeMode(RuntimeMode runtimeMode) {
- this.runtimeMode = runtimeMode;
- }
-
void setPluginFactory(PluginFactory pluginFactory) {
this.pluginFactory = pluginFactory;
}