/** * <p>Return <code>true</code> if the specified property name identifies * a writeable property on the specified bean; otherwise, return * <code>false</code>.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean to be examined (may be a {@link DynaBean} * @param name Property name to be evaluated * @return <code>true</code> if the property is writeable, * otherwise <code>false</code> * * @throws IllegalArgumentException if <code>bean</code> * or <code>name</code> is <code>null</code> * @see PropertyUtilsBean#isWriteable * @since BeanUtils 1.6 */ public static boolean isWriteable(final Object bean, final String name) { return PropertyUtilsBean.getInstance().isWriteable(bean, name); }
/** * <p>Return <code>true</code> if the specified property name identifies * a writeable property on the specified bean; otherwise, return * <code>false</code>.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean to be examined (may be a {@link DynaBean} * @param name Property name to be evaluated * @return <code>true</code> if the property is writeable, * otherwise <code>false</code> * * @throws IllegalArgumentException if <code>bean</code> * or <code>name</code> is <code>null</code> * @see PropertyUtilsBean#isWriteable * @since BeanUtils 1.6 */ public static boolean isWriteable(final Object bean, final String name) { return PropertyUtilsBean.getInstance().isWriteable(bean, name); }
for (DynaProperty origDescriptor : origDescriptors) { final String name = origDescriptor.getName(); if (isReadable(orig, name) && isWriteable(dest, name)) { try { final Object value = ((DynaBean) orig).get(name); final Map.Entry<?, ?> entry = (Entry<?, ?>) entries.next(); final String name = (String)entry.getKey(); if (isWriteable(dest, name)) { try { if (dest instanceof DynaBean) { for (PropertyDescriptor origDescriptor : origDescriptors) { final String name = origDescriptor.getName(); if (isReadable(orig, name) && isWriteable(dest, name)) { try { final Object value = getSimpleProperty(orig, name);
for (DynaProperty origDescriptor : origDescriptors) { final String name = origDescriptor.getName(); if (isReadable(orig, name) && isWriteable(dest, name)) { try { final Object value = ((DynaBean) orig).get(name); final Map.Entry<?, ?> entry = (Entry<?, ?>) entries.next(); final String name = (String)entry.getKey(); if (isWriteable(dest, name)) { try { if (dest instanceof DynaBean) { for (PropertyDescriptor origDescriptor : origDescriptors) { final String name = origDescriptor.getName(); if (isReadable(orig, name) && isWriteable(dest, name)) { try { final Object value = getSimpleProperty(orig, name);
getPropertyUtils().isWriteable(dest, name)) { final Object value = ((DynaBean) orig).get(name); copyProperty(dest, name, value); for (final Map.Entry<String, Object> entry : propMap.entrySet()) { final String name = entry.getKey(); if (getPropertyUtils().isWriteable(dest, name)) { copyProperty(dest, name, entry.getValue()); getPropertyUtils().isWriteable(dest, name)) { try { final Object value =
getPropertyUtils().isWriteable(dest, name)) { final Object value = ((DynaBean) orig).get(name); copyProperty(dest, name, value); for (final Map.Entry<String, Object> entry : propMap.entrySet()) { final String name = entry.getKey(); if (getPropertyUtils().isWriteable(dest, name)) { copyProperty(dest, name, entry.getValue()); getPropertyUtils().isWriteable(dest, name)) { try { final Object value =
/** * Checks whether the specified property of the given bean instance supports * write access. * * @param bean the bean instance * @param propName the name of the property in question * @return <b>true</b> if this property can be written, <b>false</b> * otherwise */ private static boolean isPropertyWriteable(final Object bean, final String propName) { return BEAN_UTILS_BEAN.getPropertyUtils().isWriteable(bean, propName); }
/** * Check if property is writable and not in ignore list and common ignore * list. * * @param propertyUtilsBean * @param toBean * @param property * @param ignoreList */ private static boolean shouldCopy(PropertyUtilsBean propertyUtilsBean, Object toBean, String property, List<String> ignoreList) { return propertyUtilsBean.isWriteable(toBean, property) && !ignoreList.contains(property) && !COMMON_IGNORED_FIELDS.contains(property); }
/** * <p>Return <code>true</code> if the specified property name identifies * a writeable property on the specified bean; otherwise, return * <code>false</code>.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean to be examined (may be a {@link DynaBean} * @param name Property name to be evaluated * @return <code>true</code> if the property is writeable, * otherwise <code>false</code> * * @exception IllegalArgumentException if <code>bean</code> * or <code>name</code> is <code>null</code> * @see PropertyUtilsBean#isWriteable * @since BeanUtils 1.6 */ public static boolean isWriteable(Object bean, String name) { return PropertyUtilsBean.getInstance().isWriteable(bean, name); }
/** * <p>Return <code>true</code> if the specified property name identifies * a writeable property on the specified bean; otherwise, return * <code>false</code>.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean to be examined (may be a {@link DynaBean} * @param name Property name to be evaluated * @return <code>true</code> if the property is writeable, * otherwise <code>false</code> * * @throws IllegalArgumentException if <code>bean</code> * or <code>name</code> is <code>null</code> * @see PropertyUtilsBean#isWriteable * @since BeanUtils 1.6 */ public static boolean isWriteable(final Object bean, final String name) { return PropertyUtilsBean.getInstance().isWriteable(bean, name); }
/** * <p>Return <code>true</code> if the specified property name identifies * a writeable property on the specified bean; otherwise, return * <code>false</code>.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean to be examined (may be a {@link DynaBean} * @param name Property name to be evaluated * @return <code>true</code> if the property is writeable, * otherwise <code>false</code> * * @exception IllegalArgumentException if <code>bean</code> * or <code>name</code> is <code>null</code> * @see PropertyUtilsBean#isWriteable * @since BeanUtils 1.6 */ public static boolean isWriteable(Object bean, String name) { return PropertyUtilsBean.getInstance().isWriteable(bean, name); }
/** * <p>Return <code>true</code> if the specified property name identifies * a writeable property on the specified bean; otherwise, return * <code>false</code>.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean to be examined (may be a {@link DynaBean} * @param name Property name to be evaluated * @return <code>true</code> if the property is writeable, * otherwise <code>false</code> * * @exception IllegalArgumentException if <code>bean</code> * or <code>name</code> is <code>null</code> * @see PropertyUtilsBean#isWriteable * @since BeanUtils 1.6 */ public static boolean isWriteable(Object bean, String name) { return PropertyUtilsBean.getInstance().isWriteable(bean, name); }
public static void copyProperties(BeanUtilsBean beanUtilsBean, Object bean, Map properties) { if (bean == null || properties == null) { return; } for (Iterator itr = properties.keySet().iterator(); itr.hasNext();) { String name = (String) itr.next(); if (name == null) { continue; } if (beanUtilsBean.getPropertyUtils().isWriteable(bean, name)) { try { beanUtilsBean .copyProperty(bean, name, properties.get(name)); } catch (Throwable t) { if (logger_.isDebugEnabled()) { logger_.debug("Can't copy property '" + name + "'", t); } } } } } }
/** * Returns <code>true</code> if a bean property can be written to (i.e. there is an accessible and appropriately * typed setter method on the bean). Note: this method will check for both scalar (normal) and indexed properties * before returning <code>false</code>. * * @param propertyName * the name of the bean property to check for write-ability * @return <code>true</code> if the bean property can be written to */ public boolean isWriteable( String propertyName ) { try { return propUtil.isWriteable( bean, propertyName ) || ( propUtil.getResolver().isIndexed( propertyName ) && propUtil.isReadable( bean, propertyName ) ); } catch ( IllegalArgumentException exception ) { logger.debug( "Exception rose. Return false value", exception ); return false; } }
for (int i = 0; i < origDescriptors.length; i++) { String name = origDescriptors[i].getName(); if (isReadable(orig, name) && isWriteable(dest, name)) { try { Object value = ((DynaBean) orig).get(name); Map.Entry entry = (Map.Entry) entries.next(); String name = (String)entry.getKey(); if (isWriteable(dest, name)) { try { if (dest instanceof DynaBean) { for (int i = 0; i < origDescriptors.length; i++) { String name = origDescriptors[i].getName(); if (isReadable(orig, name) && isWriteable(dest, name)) { try { Object value = getSimpleProperty(orig, name);
getPropertyUtils().isWriteable(dest, name)) { Object value = ((DynaBean) orig).get(name); copyProperty(dest, name, value); Map.Entry entry = (Map.Entry) entries.next(); String name = (String)entry.getKey(); if (getPropertyUtils().isWriteable(dest, name)) { copyProperty(dest, name, entry.getValue()); getPropertyUtils().isWriteable(dest, name)) { try { Object value =
getPropertyUtils().isWriteable(dest, name)) { Object value = ((DynaBean) orig).get(name); copyProperty(dest, name, value); Map.Entry entry = (Map.Entry) entries.next(); String name = (String)entry.getKey(); if (getPropertyUtils().isWriteable(dest, name)) { copyProperty(dest, name, entry.getValue()); getPropertyUtils().isWriteable(dest, name)) { try { Object value =
&& bu.getPropertyUtils().isWriteable(dest, name)) { if (log.isInfoEnabled()) { log.info("prop is copiable:" + name);
|| !bean.isWriteable(m_baseObject, m_baseObjectProperty)) { try {
|| !bean.isWriteable(m_baseObject, m_baseObjectProperty)) { try {