01: /*
02: * Copyright 2002-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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
27: InvalidPropertyException {
28:
29: /**
30: * Create a new NotReadablePropertyException.
31: * @param beanClass the offending bean class
32: * @param propertyName the offending property
33: */
34: public NotReadablePropertyException(Class beanClass,
35: String propertyName) {
36: super (
37: beanClass,
38: propertyName,
39: "Bean property '"
40: + propertyName
41: + "' is not readable or has an invalid getter method: "
42: + "Does the return type of the getter match the parameter type of the setter?");
43: }
44:
45: /**
46: * Create a new NotReadablePropertyException.
47: * @param beanClass the offending bean class
48: * @param propertyName the offending property
49: * @param msg the detail message
50: */
51: public NotReadablePropertyException(Class beanClass,
52: String propertyName, String msg) {
53: super(beanClass, propertyName, msg);
54: }
55:
56: }
|