KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > util > SilentErrorQueue


1 package polyglot.util;
2
3 import java.util.ArrayList JavaDoc;
4 import java.util.List JavaDoc;
5
6 /**
7  * A <code>SilentErrorQueue</code> records but does not output error messages.
8  */

9 public class SilentErrorQueue extends AbstractErrorQueue
10 {
11     private List JavaDoc errors;
12
13     public SilentErrorQueue(int limit, String JavaDoc name) {
14         super(limit, name);
15         this.errors = new ArrayList JavaDoc(limit);
16     }
17
18     public void displayError(ErrorInfo e) {
19         errors.add(e);
20     }
21     
22     public List JavaDoc getErrors() {
23         return errors;
24     }
25 }
26
Popular Tags