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