public class PluginManager<T extends AbstractPlugin> extends Object implements InvocationHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
PluginManager.CircularDependencyException |
| Constructor and Description |
|---|
PluginManager() |
| Modifier and Type | Method and Description |
|---|---|
<CALLBACK extends PluginCallbacks> |
getProxy(Class<CALLBACK> interfaceClass) |
void |
initialize() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
void |
register(T plugin) |
protected List<T> |
sortPluginsByDependencies(List<T> plugins)
Sort the plugins according to their mutual dependencies.
|
protected List<T extends AbstractPlugin> plugins
public <CALLBACK extends PluginCallbacks> CALLBACK getProxy(Class<CALLBACK> interfaceClass)
protected List<T> sortPluginsByDependencies(List<T> plugins) throws PluginManager.CircularDependencyException
plugins - the unsorted list of pluginsPluginManager.CircularDependencyException - if a circular dependency is detectedpublic void register(T plugin)
Copyright © 2020. All rights reserved.