List of usage examples for org.springframework.beans NotWritablePropertyException NotWritablePropertyException
public NotWritablePropertyException(Class<?> beanClass, String propertyName)
From source file:org.sakaiproject.metaobj.utils.mvc.impl.MixedBeanWrapper.java
protected BeanWrapperImpl createNestedWrapper(String parentPath, String nestedProperty) { Class type = getPropertyType(nestedProperty); if (type == null) { throw new NotWritablePropertyException(String.class, nestedProperty); }/* w w w .j a va 2 s.c om*/ if (java.util.Map.class.isAssignableFrom(type)) { return new MapWrapper((Map) getPropertyValue(nestedProperty), parentPath + NESTED_PROPERTY_SEPARATOR + nestedProperty, getWrappedInstance()); } else { return super.createNestedWrapper(parentPath, nestedProperty); } }
From source file:net.sf.morph.beans.MorphBeanWrapper.java
public boolean isWritableProperty(String propertyName) throws BeansException { try {/*from w w w . j a v a2 s. c o m*/ return beanReflector.isWriteable(bean, propertyName); } catch (ReflectionException e) { //TODO why do we throw this here? throw new NotWritablePropertyException(bean.getClass(), propertyName); // throw new FatalBeanException("Unable to determine if property '" + propertyName + "' is writeable in bean " + ObjectUtils.getObjectDescription(bean), e); } }