Exception thrown on an attempt to set the value of a property
that isn't writable, because there's no setter method. In some
situations alternatives are presented.
| Constructor: |
public NotWritablePropertyException(Class beanClass,
String propertyName) {
super(beanClass, propertyName,
"Bean property '" + propertyName + "' is not writable or has an invalid setter method: " +
"Does the return type of the getter match the parameter type of the setter?");
}
Create a new NotWritablePropertyException. Parameters:
beanClass - the offending bean class
propertyName - the offending property name
|
public NotWritablePropertyException(Class beanClass,
String propertyName,
String msg) {
super(beanClass, propertyName, msg);
}
Create a new NotWritablePropertyException. Parameters:
beanClass - the offending bean class
propertyName - the offending property name
msg - the detail message
|
public NotWritablePropertyException(Class beanClass,
String propertyName,
String msg,
Throwable cause) {
super(beanClass, propertyName, msg, cause);
}
Create a new NotWritablePropertyException. Parameters:
beanClass - the offending bean class
propertyName - the offending property name
msg - the detail message
cause - the root cause
|
public NotWritablePropertyException(Class beanClass,
String propertyName,
String msg,
String[] possibleMatches) {
super(beanClass, propertyName, msg);
this.possibleMatches = possibleMatches;
}
Create a new NotWritablePropertyException. Parameters:
beanClass - the offending bean class
propertyName - the offending property name
msg - the detail message
possibleMatches - suggestions for actual bean property names
that closely match the invalid property name
|