// Create the method.
JavaMethod javaMethod = new JavaMethod(modifiers, fieldType, methodName);
if (implementAtThisLevel) {
JavaField field = new JavaField.Instance (null, fieldName, fieldType);
javaMethod.addStatement(new ReturnStatement(field));
} else {
// This class should throw an error for any access. The methods will
// be overridden by derived classes for each data constructor.
JavaExpression getDCName =
new MethodInvocation.Instance(null, GET_DC_NAME_METHOD_NAME, JavaTypeName.STRING, MethodInvocation.InvocationType.VIRTUAL);