Element modulePrefs = (Element) module.appendChild(d.createElement("ModulePrefs"));
addInjectedModulePrefs(logger, type, modulePrefs);
// Write out the ModulePrefs tag
ModulePrefs prefs = type.getAnnotation(ModulePrefs.class);
if (prefs != null) {
GadgetUtils.writeAnnotationToElement(logger, prefs, modulePrefs,
"requirements", "locales");
GadgetUtils.writeRequirementsToElement(logger, d, modulePrefs,
prefs.requirements());
GadgetUtils.writeLocalesToElement(logger, d, modulePrefs, prefs.locales());
}
// Write out the UserPref tags
JClassType preferenceType = typeOracle.findType(Preference.class.getName().replace(