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'sClassLoader
all the jar files and all the class files specified in thePluginClasspath
.
-
-
Field Summary
Fields Modifier and Type Field Description protected PluginClasspath
pluginClasspath
protected PluginManager
pluginManager
-
Constructor Summary
Constructors Constructor Description BasePluginLoader(PluginManager pluginManager, PluginClasspath pluginClasspath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PluginClassLoader
createPluginClassLoader(java.nio.file.Path pluginPath, PluginDescriptor pluginDescriptor)
boolean
isApplicable(java.nio.file.Path pluginPath)
Returns true if this loader is applicable to the givenPath
.protected void
loadClasses(java.nio.file.Path pluginPath, PluginClassLoader pluginClassLoader)
protected void
loadJars(java.nio.file.Path pluginPath, PluginClassLoader pluginClassLoader)
java.lang.ClassLoader
loadPlugin(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:PluginLoader
Returns true if this loader is applicable to the givenPath
.- Specified by:
isApplicable
in interfacePluginLoader
- Returns:
-
loadPlugin
public java.lang.ClassLoader loadPlugin(java.nio.file.Path pluginPath, PluginDescriptor pluginDescriptor)
- Specified by:
loadPlugin
in 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)
-
-