diff --git a/test/org/redkale/test/util/CreatorRecord.java b/test/org/redkale/test/util/CreatorRecord.java new file mode 100644 index 000000000..268aef555 --- /dev/null +++ b/test/org/redkale/test/util/CreatorRecord.java @@ -0,0 +1,43 @@ +/* + * 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 org.redkale.test.util; + +import java.util.*; +import org.redkale.util.*; + +/** + * + * @author zhangjx + */ +public class CreatorRecord { + + private final int id; + + private String name; + + public CreatorRecord(int id, String name) { + this.id = id; + this.name = name; + } + + private static Creator createCreator() { + return new Creator() { + @Override + public Object create(Object... params) { + return new CreatorRecord((Integer) params[0], (String) params[1]); + } + + @Override + public String toString(){ + return "CreatorRecord_Creator" + Objects.hashCode(this); + } + }; + } + + public static void main(String[] args) throws Exception { + System.out.println(Creator.create(CreatorRecord.class)); + } +}