public class PluginManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PluginManager.PluginTest
A Test that checks to see if each class is annotated with a specific annotation.
|
Constructor and Description |
---|
PluginManager(String type)
Constructor that takes only a type name.
|
PluginManager(String type,
Class<?> clazz)
Constructor that takes a type name and a Class.
|
Modifier and Type | Method and Description |
---|---|
static void |
addPackage(String p)
Adds a package name to be scanned for plugins.
|
void |
collectPlugins()
Locates all the plugins.
|
void |
collectPlugins(boolean preLoad,
String pkgs)
Collects plugins, optionally obtaining them from a preload map.
|
Map<String,PluginType<?>> |
getPlugins()
Returns all the matching plugins.
|
PluginType<?> |
getPluginType(String name)
Returns the type of a specified plugin.
|
static void |
main(String[] args) |
public PluginManager(String type)
type
- The type name.public static void addPackage(String p)
p
- The package name.public PluginType<?> getPluginType(String name)
name
- The name of the plugin.public Map<String,PluginType<?>> getPlugins()
public void collectPlugins()
public void collectPlugins(boolean preLoad, String pkgs)
preLoad
- if true, plugins will be obtained from the preload map.pkgs
- A comma separated list of package names to scan for plugins. If
null the default Log4j package name will be used.Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.