|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.digester3.plugins.RuleLoader
org.apache.commons.digester3.plugins.strategies.LoaderFromClass
public class LoaderFromClass
A RuleLoader which invokes a static method on a target class, leaving that method to actually instantiate and add new rules to a Digester instance.
| Constructor Summary | |
|---|---|
LoaderFromClass(Class<?> rulesClass,
Method rulesMethod)
Constructor. |
|
LoaderFromClass(Class<?> rulesClass,
String methodName)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addRules(Digester d,
String path)
Configures the digester with custom rules for some plugged-in class. |
static Method |
locateMethod(Class<?> rulesClass,
String methodName)
Find a method on the specified class whose name matches methodName, and whose signature is: public static void foo(Digester d, String patternPrefix);. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoaderFromClass(Class<?> rulesClass,
Method rulesMethod)
rulesClass - The target classrulesMethod - The method has to be invoked
public LoaderFromClass(Class<?> rulesClass,
String methodName)
throws PluginException
rulesClass - The target classmethodName - The method name has to be invoked
PluginException - if input method can't be located inside the given class| Method Detail |
|---|
public void addRules(Digester d,
String path)
throws PluginException
This method is invoked when the start of an xml tag is encountered which maps to a PluginCreateRule. Any rules added here are removed from the digester when the end of that xml tag is encountered.
addRules in class RuleLoaderd - The gigester has to be configuredpath - The path where rule has to be bound
PluginException - if any error occurs
public static Method locateMethod(Class<?> rulesClass,
String methodName)
throws PluginException
public static void foo(Digester d, String patternPrefix);.
rulesClass - The target classmethodName - The method name has to be invoked
PluginException - if any error occurs while discovering the method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||