private void replaceAccessToField(InternalClassTransformation ct, String baseName)
{
String fieldName = "_" + baseName;
String readMethodName = "_read_" + baseName;
TransformMethodSignature readMethodSignature = new TransformMethodSignature(Modifier.PRIVATE,
STRING_CLASS_NAME, readMethodName, null, null);
ct.addNewMethod(readMethodSignature, String.format("throw new RuntimeException(\"read %s\");", baseName));
ct.replaceReadAccess(fieldName, readMethodName);
String writeMethodName = "_write_" + baseName;
TransformMethodSignature writeMethodSignature = new TransformMethodSignature(Modifier.PRIVATE, "void",
writeMethodName, new String[]
{ STRING_CLASS_NAME }, null);
ct.addNewMethod(writeMethodSignature, String.format("throw new RuntimeException(\"write %s\");", baseName));
ct.replaceWriteAccess(fieldName, writeMethodName);