MethodGen mg = new MethodGen(
Constants.ACC_FINAL | Constants.ACC_PUBLIC, methodReturnType,
methodArgTypes, null, // arg names
method.getName(), clazz.getClassName(), il, cp);
mg.addAttribute(new Synthetic(cp.addUtf8("Synthetic"), 0, null, cp
.getConstantPool()));
Class[] throwsException = method.getExceptionTypes();
for (int i = 0; i < throwsException.length; i++) {
mg.addException(throwsException[i].getName());