KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > ExceptionSpec


1 package persistence.antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/license.html
6  *
7  */

8
9 import persistence.antlr.collections.impl.Vector;
10
11 class ExceptionSpec {
12     // Non-null if this refers to a labeled rule
13
// Use a token instead of a string to get the line information
14
protected Token label;
15
16     // List of ExceptionHandler (catch phrases)
17
protected Vector handlers;
18
19
20     public ExceptionSpec(Token label_) {
21         label = label_;
22         handlers = new Vector();
23     }
24
25     public void addHandler(ExceptionHandler handler) {
26         handlers.appendElement(handler);
27     }
28 }
29
Popular Tags