KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > format > parser > AbstractParser


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9
10 package org.jboss.portal.format.parser;
11
12
13 /**
14  * This is an abstract parser. All the parsed events will go though
15  * the event notifier interface.
16  *
17  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
18  * @version $Revision: 1.2 $
19  */

20 public abstract class AbstractParser implements ParseEventNotifier
21 {
22
23    /** The event handler. */
24    protected ParseEventHandler handler;
25
26    /**
27     * Set the event handler on this parser.
28     */

29    public void setHandler(ParseEventHandler handler)
30    {
31       this.handler = handler;
32    }
33
34    /**
35     * Ask the parser to its job.
36     */

37    public abstract void parse(char[] chars, int offset, int length);
38
39 }
40
Popular Tags