}
sbFields.append("\n");
}
for (FieldData fieldData : fieldDataList) {
Type type = fieldData.type;
String name = fieldData.name;
String parcelableClassName = fieldData.parcelableClassName;
// Check if it's a known type
if (type.packageName != null) {
importSet.add(String.format(IMPORT, type.packageName, type.name));
}
if (type.needsArrayListImport) {
importSet.add(String.format(IMPORT, "java.util", "ArrayList"));
}
if (type.needsSparseArrayImport) {
importSet.add(String.format(IMPORT, "android.util", "SparseArray"));
}
if (fieldData.parcelableClassName != null && fieldData.parcelableClassPackage != null) {
importSet.add(String.format(IMPORT, fieldData.parcelableClassPackage,
parcelableClassName));
}
if (fieldData.isGroupStart) {
sbFields.append("\n");
sbConstructor.append("\n");
sbWriteToParcel.append("\n");
}
sbFields.append(type.getField(name, fieldData.defaultValue, parcelableClassName));
sbConstructor.append(type.getConstructorString(name, parcelableClassName));
sbWriteToParcel.append(type.getWriteToParcelString(name));
}
boolean firstImport = true;
for (String importString : importSet) {
if (firstImport) {