@Test public void testBeanToBean() { Person person = new Person("Daniel Li", 24); PerformanceMonitor.start("BeanUtilsTest"); for (int i = 0; i < 5; i++) { for (int j = 0; j < 50000; j++) { PersonDto personDto = new PersonDto(); BeanUtils.copyProperties(person, personDto); } PerformanceMonitor.mark("BeanUtils" + i); } BeanCopier copier = BeanCopier.create(Person.class, PersonDto.class, false); for (int i = 0; i < 5; i++) { for (int j = 0; j < 50000; j++) { PersonDto personDto = new PersonDto(); copier.copy(person, personDto, null); } PerformanceMonitor.mark("BeanCopier" + i); } BeanCopy beanCopy = BeanCopy.create(Person.class, PersonDto.class); for (int i = 0; i < 5; i++) { for (int j = 0; j < 50000; j++) { PersonDto personDto = new PersonDto(); beanCopy.copy(person, personDto); } PerformanceMonitor.mark("BeanCopy" + i); } PerformanceMonitor.stop(); PerformanceMonitor.summarize(new AdvancedStopWatchSummary(true)); PerformanceMonitor.remove(); }
public static void copyProperties(Object source, Object target) throws BeansException { org.springframework.beans.BeanUtils.copyProperties(source, target); }
BeanUtils { public static void copyProperties(Object source, Object target) throws BeansException { org.springframework.beans.BeanUtils.copyProperties(source, target); } }
BeanUtils { public static void copyProperties(Object source, Object target) throws BeansException { org.springframework.beans.BeanUtils.copyProperties(source, target); }  }
BeanUtils { public static void copyProperties(Object source, Object target) throws BeansException { org.springframework.beans.BeanUtils.copyProperties(source, target); }  static void copyProperties(Object source, Object target); static void copyProperties(Object source, String[] copyProperties, Object target); static void copyProperties(Map<String, Object> source, String[] copyProperties, Object target); static void copyProperties(Object source, String[] copyProperties, Map<String, Object> target); static void copyProperties(Object source, Object target, String... ignoreProperties); static void copyProperties(Map<String, Object> source, Object target, String... ignoreProperties); static void copyProperties(Object source, Map<String, Object> target, String... ignoreProperties); static Method findDeclaredMethod(Class<?> clazz, String methodName, Class<?>... paramTypes); static Method findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes); static Method findStaticMethod(Class<?> clazz, String methodName, Class<?>... paramTypes); static PropertyDescriptor[] getPropertyDescriptors(Class<?> clazz); static PropertyDescriptor getPropertyDescriptor(Class<?> clazz, String propertyName); static PropertyDescriptor findPropertyForMethod(Method method); static Class<?> findPropertyType(String propertyName, Class<?>[] beanClasses); static MethodParameter getWriteMethodParameter(PropertyDescriptor pd); static PropertyEditor findEditorByConvention(Class<?> targetType); static T instantiate(Class<T> clazz); static T instantiateClass(Class<T> clazz); static T instantiateClass(Class<?> clazz, Class<T> assignableTo); static T instantiateClass(Constructor<T> ctor, Object... args); }
BeanUtils { public static void copyProperties(Object source, Object target) throws BeansException { org.springframework.beans.BeanUtils.copyProperties(source, target); }  static void copyProperties(Object source, Object target); static void copyProperties(Object source, String[] copyProperties, Object target); static void copyProperties(Map<String, Object> source, String[] copyProperties, Object target); static void copyProperties(Object source, String[] copyProperties, Map<String, Object> target); static void copyProperties(Object source, Object target, String... ignoreProperties); static void copyProperties(Map<String, Object> source, Object target, String... ignoreProperties); static void copyProperties(Object source, Map<String, Object> target, String... ignoreProperties); static Method findDeclaredMethod(Class<?> clazz, String methodName, Class<?>... paramTypes); static Method findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes); static Method findStaticMethod(Class<?> clazz, String methodName, Class<?>... paramTypes); static PropertyDescriptor[] getPropertyDescriptors(Class<?> clazz); static PropertyDescriptor getPropertyDescriptor(Class<?> clazz, String propertyName); static PropertyDescriptor findPropertyForMethod(Method method); static Class<?> findPropertyType(String propertyName, Class<?>[] beanClasses); static MethodParameter getWriteMethodParameter(PropertyDescriptor pd); static PropertyEditor findEditorByConvention(Class<?> targetType); static T instantiate(Class<T> clazz); static T instantiateClass(Class<T> clazz); static T instantiateClass(Class<?> clazz, Class<T> assignableTo); static T instantiateClass(Constructor<T> ctor, Object... args);  }