|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.digester.plugins.Declaration
public class Declaration
Represents a Class that can be instantiated by a PluginCreateRule, plus info on how to load custom digester rules for mapping xml into that plugged-in class.
Constructor Summary | |
---|---|
Declaration(java.lang.Class pluginClass)
Constructor. |
|
Declaration(java.lang.Class pluginClass,
RuleLoader ruleLoader)
Create an instance where a fully-initialised ruleLoader instance is provided by the caller instead of having the PluginManager "discover" an appropriate one. |
|
Declaration(java.lang.String pluginClassName)
Constructor. |
Method Summary | |
---|---|
void |
configure(Digester digester,
java.lang.String pattern)
Attempt to load custom rules for the target class at the specified pattern. |
java.lang.String |
getId()
Return the id associated with this declaration. |
java.lang.Class |
getPluginClass()
Return plugin class associated with this declaration. |
void |
init(Digester digester,
PluginManager pm)
Must be called exactly once, and must be called before any call to the configure method. |
void |
setId(java.lang.String id)
The id that the user associated with a particular plugin declaration in the input xml. |
void |
setProperties(java.util.Properties p)
Copy all (key,value) pairs in the param into the properties member of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Declaration(java.lang.String pluginClassName)
public Declaration(java.lang.Class pluginClass)
public Declaration(java.lang.Class pluginClass, RuleLoader ruleLoader)
Method Detail |
---|
public void setId(java.lang.String id)
For plugins declared "in-line", the id is null.
public java.lang.String getId()
public void setProperties(java.util.Properties p)
The declaration properties cannot be explicit member variables, because the set of useful properties a user can provide on a declaration depends on what RuleFinder classes are available - and extra RuleFinders can be added by the user. So here we keep a map of the settings, and let the RuleFinder objects look for whatever properties they consider significant.
The "id" and "class" properties are treated differently.
public java.lang.Class getPluginClass()
public void init(Digester digester, PluginManager pm) throws PluginException
PluginException
public void configure(Digester digester, java.lang.String pattern) throws PluginException
On return, any custom rules associated with the plugin class have been loaded into the Rules object currently associated with the specified digester object.
PluginException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |