@Test public void copySingleObject() { Student student = new Student("zhang3", 20, new Teacher("li4"), ListUtil.newArrayList("chinese", "english")); StudentVO studentVo = BeanMapper.map(student, StudentVO.class); assertThat(studentVo.name).isEqualTo("zhang3"); assertThat(studentVo.getAge()).isEqualTo(20); assertThat(studentVo.getTeacher().getName()).isEqualTo("li4"); assertThat(studentVo.getCourse()).containsExactly("chinese", "english"); }
public static <S, D> D map(S source, Class<D> destinationClass) { return mapper.map(source, destinationClass); }
BeanMapper { public static <S, D> D map(S source, Class<D> destinationClass) { return mapper.map(source, destinationClass); } }
BeanMapper { public static <S, D> D map(S source, Class<D> destinationClass) { return mapper.map(source, destinationClass); }  }
BeanMapper { public static <S, D> D map(S source, Class<D> destinationClass) { return mapper.map(source, destinationClass); }  static D map(S source, Class<D> destinationClass); static List<D> mapList(Iterable<S> sourceList, Class<D> destinationClass); static D[] mapArray(final S[] sourceArray, final Class<D> destinationClass); }
BeanMapper { public static <S, D> D map(S source, Class<D> destinationClass) { return mapper.map(source, destinationClass); }  static D map(S source, Class<D> destinationClass); static List<D> mapList(Iterable<S> sourceList, Class<D> destinationClass); static D[] mapArray(final S[] sourceArray, final Class<D> destinationClass);  }