KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > UnresolvedComponentException


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 7, 2005
10  *
11  * Author Ben Yu
12  * ZBS
13  */

14 package jfun.yan;
15
16 /**
17  * Represents exception when a component cannot be resolved.
18  * <p>
19  * Codehaus.org.
20  *
21  * @author Ben Yu
22  *
23  */

24 public class UnresolvedComponentException extends
25     ComponentResolutionException {
26   private final Object JavaDoc key;
27   /**
28    * Create an UnresolvedComponentException object.
29    * @param k the component key.
30    * @param msg the error message.
31    */

32   public UnresolvedComponentException(Object JavaDoc k, String JavaDoc msg) {
33     super(msg);
34     this.key = k;
35   }
36
37   /**
38    * Create an UnresolvedComponentException object.
39    * @param k the component key.
40    */

41   public UnresolvedComponentException(Object JavaDoc k) {
42     super("component <"+k + "> not resolved");
43     this.key = k;
44   }
45   /**
46    * Get the component key.
47    * @return the component key.
48    */

49   public Object JavaDoc getComponentKey(){
50     return key;
51   }
52 }
53
Popular Tags