Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.digester.plugins.strategies
Class LoaderFromClass

    java.lang.Object
      org.apache.commons.digester.plugins.RuleLoader
          org.apache.commons.digester.plugins.strategies.LoaderFromClass

    public class LoaderFromClass

extends RuleLoader

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.

Since:
  1.6

Constructor Summary
`LoaderFromClass(Class<?> rulesClass, Method rulesMethod)` Constructor.
`LoaderFromClass(Class<?> rulesClass, String methodName)` Constructor.

Method Summary
`void` | `addRules(Digester d, String path)` Just invoke the target method.
`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

### LoaderFromClass

    public LoaderFromClass(Class<?> rulesClass,
                           Method rulesMethod)

  Constructor.

### LoaderFromClass

    public LoaderFromClass(Class<?> rulesClass,
                           String methodName)
                    throws PluginException

  Constructor.

  Throws:
    `PluginException`

Method Detail

### addRules

    public void addRules(Digester d,
                         String path)
                  throws PluginException

  Just invoke the target method.

  Specified by:
    `addRules` in class `RuleLoader`
  Throws:
    `PluginException`

### locateMethod

    public static Method locateMethod(Class<?> rulesClass,
                                      String methodName)
                               throws PluginException

  Find a method on the specified class whose name matches methodName, and whose signature is: `public static void foo(Digester d, String patternPrefix);`.

  Returns:
    null if no such method exists.
  Throws:
    `PluginException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.