private void buildFields(SimpleRecordType struct, JimpleClassBuilder recordClass, GimpleRecordTypeDef def) {
for (GimpleField member : def.getFields()) {
ImType type = context.resolveType(member.getType());
struct.addMember(member.getName(), type);
JimpleFieldBuilder field = recordClass.newField();
field.setName(member.getName());
field.setType(type.returnType()); // TODO: probably need a fieldType()
field.setModifiers(JimpleModifiers.PUBLIC);
}
}