This commit is contained in:
kamhung
2015-12-07 09:49:33 +08:00
parent 17bd0b2366
commit 99c212a99f
3 changed files with 17 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.wentch.redkale.test.util;
/**
*
* @author zhangjx
*/
public class TestABean {
public long time;
}

View File

@@ -11,7 +11,7 @@ import java.util.Map;
*
* @author zhangjx
*/
public class TestBean {
public class TestBean extends TestABean {
private String name;

View File

@@ -23,12 +23,14 @@ public class UntilTestMain {
final TestBean bean = new TestBean();
bean.setId(123456);
bean.setName("zhangjx");
bean.time = 2000;
final TestXBean beanx = new TestXBean();
Reproduce<TestXBean, TestBean> action1 = Reproduce.create(TestXBean.class, TestBean.class);
Reproduce<TestXBean, TestBean> action2 = new Reproduce<TestXBean, TestBean>() {
@Override
public TestXBean copy(TestXBean dest, TestBean src) {
dest.time = src.time;
dest.setId(src.getId());
dest.setName(src.getName());
dest.setMap(src.getMap());