KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > digester > plugins > RuleLoader


1 /* $Id: RuleLoader.java 155412 2005-02-26 12:58:36Z dirkv $
2  *
3  * Copyright 2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17  
18 package org.apache.commons.digester.plugins;
19
20 import org.apache.commons.digester.Digester;
21
22 /**
23  * Interface for classes which can dynamically load custom
24  * plugin rules associated with a user's plugin class.
25  * <p>
26  * Each plugin declaration has an associated RuleLoader instance, and that
27  * instance's addRules method is invoked each time the input xml specifies
28  * that an instance of that plugged-in class is to be created.
29  * <p>
30  * This is an abstract class rather than an interface in order to make
31  * it possible to enhance this class in future without breaking binary
32  * compatibility; it is possible to add methods to an abstract class, but
33  * not to an interface.
34  *
35  * @since 1.6
36  */

37
38 public abstract class RuleLoader {
39     
40     /**
41      * Configures the digester with custom rules for some plugged-in
42      * class.
43      * <p>
44      * This method is invoked when the start of an xml tag is encountered
45      * which maps to a PluginCreateRule. Any rules added here are removed
46      * from the digester when the end of that xml tag is encountered.
47      */

48     public abstract void addRules(Digester d, String JavaDoc path) throws PluginException;
49 }
50
Popular Tags