if (bp.isWrite())
/** * Return true if this property is write only, which means we cannot get a value for it. * * @param instance the instance * @param propertyName the property name * @return true if there is a way to write but not read the property */ public boolean isWriteOnly(Object instance, String propertyName) { if (instance == null || propertyName == null) return false; BeanProperty bp = getBeanProperty(instance, propertyName); return bp != null && bp.isWrite() && !bp.isRead(); }
/** * Return true if this property is write only, which means we cannot get a value for it. * * @param instance the instance * @param propertyName the property name * @return true if there is a way to write but not read the property */ public boolean isWriteOnly(Object instance, String propertyName) { if (instance == null || propertyName == null) return false; BeanProperty bp = getBeanProperty(instance, propertyName); return bp != null && bp.isWrite() && !bp.isRead(); }