KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* $Id: RulesFactory.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 import org.apache.commons.digester.Rules;
22
23 /**
24  * Whenever the scope of a plugin tag is entered, the PluginRules class
25  * creates a new Rules instance and configures it with the appropriate
26  * parsing rules for the plugged-in class.
27  * <p>
28  * Users of the plugins module can specify a subclass of this one to
29  * control the creation of that Rules object. In particular, it can
30  * set up default rules within the returned instance which are applicable
31  * to all plugged-in classes.
32  *
33  * @since 1.6
34  */

35
36 public abstract class RulesFactory {
37
38     /**
39      * Return an instance of some Rules implementation that the plugged-in
40      * class shall use to match its private parsing rules.
41      * <p>
42      * @param d is the digester that the returned rules object will be
43      * associated with.
44      *
45      * @param pluginClass is the class that is to be configured using rules
46      * added to the returnedobject.
47      *
48      * @throws PluginException if the algorithm finds a source
49      * of rules, but there is something invalid about that source.
50      */

51
52      public abstract Rules newRules(Digester d, Class JavaDoc pluginClass)
53                         throws PluginException;
54 }
55
56
Popular Tags