Package org.pf4j
Class CompoundPluginLoader
- java.lang.Object
-
- org.pf4j.CompoundPluginLoader
-
- All Implemented Interfaces:
PluginLoader
public class CompoundPluginLoader extends java.lang.Object implements PluginLoader
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<PluginLoader>
loaders
private static org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description CompoundPluginLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundPluginLoader
add(PluginLoader loader)
CompoundPluginLoader
add(PluginLoader loader, java.util.function.BooleanSupplier condition)
Add aPluginLoader
only if thecondition
is satisfied.boolean
isApplicable(java.nio.file.Path pluginPath)
Returns true if this loader is applicable to the givenPath
.java.lang.ClassLoader
loadPlugin(java.nio.file.Path pluginPath, PluginDescriptor pluginDescriptor)
int
size()
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
loaders
private java.util.List<PluginLoader> loaders
-
-
Method Detail
-
add
public CompoundPluginLoader add(PluginLoader loader)
-
add
public CompoundPluginLoader add(PluginLoader loader, java.util.function.BooleanSupplier condition)
Add aPluginLoader
only if thecondition
is satisfied.- Parameters:
loader
-condition
-- Returns:
-
size
public int size()
-
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
-
-