/// <summary> /// Define a new field to emit for the current class. /// </summary> public void emitField(string name, string type, FieldAttr attr) { string key = className + "/F" + name; FieldDef fieldDef = (FieldDef)fields[key]; if (fieldDef == null) { // only add if not already stubbed out fields[key] = classDef.AddField(attr, name, findType(type)); } else { // is stubbed out, make sure we define field correctly fieldDef.SetFieldAttr(attr); } }