KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > IrresolveablePropertyException


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

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

26 public class IrresolveablePropertyException extends UnsatisfiedComponentException {
27   private final Object JavaDoc lkey;
28   private final Class JavaDoc type;
29   /**
30    * Get the property key.
31    * @return the property key.
32    */

33   public Object JavaDoc getPropertyKey() {
34     return lkey;
35   }
36   /**
37    * Get the expected property type.
38    * @return the property type.
39    */

40   public Class JavaDoc getParameterType() {
41     return type;
42   }
43   /**
44    * Create a IrresolveablePropertyException object.
45    * @param ckey the component key.
46    * @param lkey the property key.
47    * @param type the property type.
48    */

49   public IrresolveablePropertyException(final Object JavaDoc ckey, final Object JavaDoc lkey,
50       final Class JavaDoc type) {
51     super(ckey, "The property " + lkey + " of type "
52         +Misc.getTypeName(type) + " for component <" + ckey
53         + "> is not resolveable");
54     this.lkey = lkey;
55     this.type = type;
56   }
57 }
58
Popular Tags