CtMethod wmethod = CtNewMethod.make(CtClass.voidType, wrapperName, writeParam, null, "{}", clazz);
wmethod.setModifiers(mod);
clazz.addMethod(wmethod);
SignatureAttribute ai = (SignatureAttribute) field.getFieldInfo2().getAttribute(SignatureAttribute.tag);
if (ai != null)
{
MethodInfo wrapperInfo = wmethod.getMethodInfo2();
SignatureAttribute methodAtt = new SignatureAttribute(wrapperInfo.getConstPool(), "(" + ai.getSignature() + ")V");
wrapperInfo.addAttribute(methodAtt);
}
return wmethod;
}