Correct me if I'm wrong, but I'm trying to force the use of a specific
PluralRule in a message by using the following syntax:

public String myMessage(@PluralCount(DefaultRule_0_1_n.class) int
count);

but DefaultRule_0_1_n does not implement the PluralRule interface and
thus this cannot be done.

The workaround I've come up with is to define a

  static class MyDefaultRule_0_1_n implements PluralRule {
    final DefaultRule_0_1_n rule;
    public MyDefaultRule_0_1_n() {
      rule = new DefaultRule_0_1_n();
    }
    public PluralForm[] pluralForms() {
      return rule.pluralForms();
    }
    public int select(int n) {
      return rule.select(n);
    }
  }

and use that in place of DefaultRule_0_1_n.

Is this the proper way to go or should the DefaultRule* all implement
PluralRule?

Mathias.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to