}
} else {
if (ruleClass == PluralRule.class) {
ruleClass = DefaultRule.class;
}
PluralRule rule = createLocalizedPluralRule(logger,
m.getEnclosingType().getOracle(), ruleClass, locale);
logger.log(TreeLogger.TRACE, "Using plural rule " + rule.getClass()
+ " for locale '" + locale + "'", null);
generated.append(PluralRule.class.getCanonicalName());
generated.append(" rule = new " + rule.getClass().getCanonicalName()
+ "();\n");
generated.append("switch (rule.select("
+ params[pluralParamIndex].getName() + ")) {\n");
PluralForm[] pluralForms = rule.pluralForms();
resourceList.setPluralForms(key, pluralForms);
// Skip default plural form (index 0); the fall-through case will handle
// it.
for (int i = 1; i < pluralForms.length; ++i) {
String template = resourceList.getStringExt(key,