1 4 package org.oddjob.arooa.reflect; 5 6 import org.apache.commons.beanutils.BeanUtilsBean; 7 8 11 public class BeanUtilsHelper { 12 13 private static BeanUtilsBeanHelper instance = 14 new BeanUtilsBeanHelper(BeanUtilsBean.getInstance()); 15 16 public static void setProperty(Object bean, String name, Object value) { 17 instance.setProperty(bean, name, value); 18 } 19 20 public static void setMappedProperty(Object bean, String name, String key, Object value) { 21 instance.setMappedProperty(bean, name, key, value); 22 } 23 24 public static Class getPropertyType(Object bean, String name) { 25 return instance.getPropertyType(bean, name); 26 } 27 public static Object getProperty(Object bean, String name) { 28 return instance.getProperty(bean, name); 29 } 30 31 public static Object getProperty(Object bean, String name, Class required) { 32 return instance.getProperty(bean, name, required); 33 } 34 } 35 | Popular Tags |