KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > beans > NotReadablePropertyException


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.beans;
18
19 /**
20  * Exception thrown on an attempt to get the value of a property
21  * that isn't readable, because there's no getter method.
22  *
23  * @author Juergen Hoeller
24  * @since 1.0.2
25  */

26 public class NotReadablePropertyException extends InvalidPropertyException {
27
28     /**
29      * Create a new NotReadablePropertyException.
30      * @param beanClass the offending bean class
31      * @param propertyName the offending property
32      */

33     public NotReadablePropertyException(Class JavaDoc beanClass, String JavaDoc propertyName) {
34         super(beanClass, propertyName,
35                 "Bean property '" + propertyName + "' is not readable or has an invalid getter method: " +
36                 "Does the return type of the getter match the parameter type of the setter?");
37     }
38
39     /**
40      * Create a new NotReadablePropertyException.
41      * @param beanClass the offending bean class
42      * @param propertyName the offending property
43      * @param msg the detail message
44      */

45     public NotReadablePropertyException(Class JavaDoc beanClass, String JavaDoc propertyName, String JavaDoc msg) {
46         super(beanClass, propertyName, msg);
47     }
48
49 }
50
Popular Tags