m = bc.declareMethod("copy", Object.class, new Class[] {Object.class});
m.makePublic();
code = m.getCode(true);
code.anew().setType(type);
code.dup();
if (params.length == 1) {
if (params[0] == long.class) {
code.aload().setParam(0);
code.checkcast().setType(Date.class);