Package org.pf4j
Class BasePluginLoader
- java.lang.Object
-
- org.pf4j.BasePluginLoader
-
- All Implemented Interfaces:
PluginLoader
- Direct Known Subclasses:
DefaultPluginLoader,DevelopmentPluginLoader
public class BasePluginLoader extends java.lang.Object implements PluginLoader
Load all information needed by a plugin. This means add to the plugin'sClassLoaderall the jar files and all the class files specified in thePluginClasspath.
-
-
Field Summary
Fields Modifier and Type Field Description protected PluginClasspathpluginClasspathprotected PluginManagerpluginManager
-
Constructor Summary
Constructors Constructor Description BasePluginLoader(PluginManager pluginManager, PluginClasspath pluginClasspath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PluginClassLoadercreatePluginClassLoader(java.nio.file.Path pluginPath, PluginDescriptor pluginDescriptor)booleanisApplicable(java.nio.file.Path pluginPath)Returns true if this loader is applicable to the givenPath.protected voidloadClasses(java.nio.file.Path pluginPath, PluginClassLoader pluginClassLoader)protected voidloadJars(java.nio.file.Path pluginPath, PluginClassLoader pluginClassLoader)java.lang.ClassLoaderloadPlugin(java.nio.file.Path pluginPath, PluginDescriptor pluginDescriptor)
-
-
-
Field Detail
-
pluginManager
protected PluginManager pluginManager
-
pluginClasspath
protected PluginClasspath pluginClasspath
-
-
Constructor Detail
-
BasePluginLoader
public BasePluginLoader(PluginManager pluginManager, PluginClasspath pluginClasspath)
-
-
Method Detail
-
isApplicable
public boolean isApplicable(java.nio.file.Path pluginPath)
Description copied from interface:PluginLoaderReturns true if this loader is applicable to the givenPath.- Specified by:
isApplicablein interfacePluginLoader- Returns:
-
loadPlugin
public java.lang.ClassLoader loadPlugin(java.nio.file.Path pluginPath, PluginDescriptor pluginDescriptor)- Specified by:
loadPluginin interfacePluginLoader
-
createPluginClassLoader
protected PluginClassLoader createPluginClassLoader(java.nio.file.Path pluginPath, PluginDescriptor pluginDescriptor)
-
loadClasses
protected void loadClasses(java.nio.file.Path pluginPath, PluginClassLoader pluginClassLoader)
-
loadJars
protected void loadJars(java.nio.file.Path pluginPath, PluginClassLoader pluginClassLoader)
-
-