public class LoaderFromClass extends RuleLoader
Constructor and Description |
---|
LoaderFromClass(Class<?> rulesClass,
Method rulesMethod)
Constructor.
|
LoaderFromClass(Class<?> rulesClass,
String methodName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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); . |
public LoaderFromClass(Class<?> rulesClass, Method rulesMethod)
rulesClass
- The target classrulesMethod
- The method has to be invokedpublic LoaderFromClass(Class<?> rulesClass, String methodName) throws PluginException
rulesClass
- The target classmethodName
- The method name has to be invokedPluginException
- if input method can't be located inside the given classpublic 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 RuleLoader
d
- The gigester has to be configuredpath
- The path where rule has to be boundPluginException
- if any error occurspublic 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 invokedPluginException
- if any error occurs while discovering the methodCopyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.