org.apache.commons.digester.plugins
public class PluginManager extends Object
One instance of this class exists per PluginRules instance.
Since: 1.6
Field Summary | |
---|---|
HashMap | declarationsByClass Map of classname->Declaration |
HashMap | declarationsById Map of id->Declaration |
PluginManager | parent the parent manager to which this one may delegate lookups. |
PluginContext | pluginContext
The object containing data that should only exist once for each
Digester instance. |
Constructor Summary | |
---|---|
PluginManager(PluginContext r) Construct a "root" PluginManager, ie one with no parent. | |
PluginManager(PluginManager parent)
Construct a "child" PluginManager. |
Method Summary | |
---|---|
void | addDeclaration(Declaration decl)
Add the declaration to the set of known declarations.
|
RuleLoader | findLoader(Digester digester, String id, Class pluginClass, Properties props)
Given a plugin class and some associated properties, scan the
list of known RuleFinder instances until one detects a source of
custom rules for this plugin (aka a RuleLoader).
|
Declaration | getDeclarationByClass(String className)
Return the declaration object with the specified class.
|
Declaration | getDeclarationById(String id)
Return the declaration object with the specified id.
|
Parameters: parent must be non-null.
TODO: somehow get a reference to a Digester object so that we can really log here. Currently, all logging is disabled from this method.
Parameters: decl an object representing a plugin class.
If no source of custom rules can be found, null is returned.
Parameters: id Description of the Parameter
Returns: The declaration value