KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > lifecycle > Thrower


1 /*****************************************************************************
2  * Copyright (C) Codehaus.org. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  *****************************************************************************/

8 /*
9  * Created on Mar 17, 2005
10  *
11  * Author Michelle Lei
12  * ZBS
13  */

14 package jfun.yan.lifecycle;
15
16 /**
17  * Codehaus.org.
18  *
19  * @author Michelle Lei
20  *
21  */

22 final class Thrower implements ExceptionHandler {
23   public void handle(Throwable JavaDoc th)
24   throws Throwable JavaDoc{
25     throw th;
26   }
27   public String JavaDoc toString() {
28     return getClass().toString();
29   }
30   private Thrower(){}
31   private static final ExceptionHandler singleton = new Thrower();
32   public static ExceptionHandler instance(){return singleton;}
33 }
34
Popular Tags