KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > NonWritablePropertyException


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 import jfun.util.Misc;
17
18 /**
19  * Represents an exception when a bean component tries to set a property
20  * that is not writable.
21  * <p>
22  * Codehaus.org.
23  *
24  * @author Ben Yu
25  *
26  */

27 public class NonWritablePropertyException extends InvalidPropertyException {
28
29   /**
30    * Create a NonWritablePropertyException object.
31    * @param type the property type.
32    * @param name the property name.
33    */

34   public NonWritablePropertyException(Class JavaDoc type, String JavaDoc name) {
35     super(type, name,
36         "property " + name + " not writable in type "+Misc.getTypeName(type));
37
38   }
39   /**
40    * Create a NonWritablePropertyException object.
41    * @param type the property type.
42    * @param name the property name.
43    * @param msg the error message.
44    */

45   public NonWritablePropertyException(Class JavaDoc type, String JavaDoc name, String JavaDoc msg) {
46     super(type, name, msg);
47
48   }
49 }
50
Popular Tags