public static abstract @interface

Messages.AlternateMessage

implements Annotation
com.google.gwt.i18n.client.Messages.AlternateMessage

Class Overview

Provides alternate forms of a message, such as are needed when plural forms are used or a placeholder has known gender. The selection of which form to use is based on the value of the arguments marked PluralCount and/or Select.

Example:

   @DefaultMessage("You have {0} widgets.")
   @AlternateMessage({"one", "You have one widget.")
   String example(@PluralCount int count);
 

If multiple Messages.PluralCount or Messages.Select parameters are supplied, the forms for each, in the order they appear in the parameter list, are supplied separated by a vertical bar ("|"). Example:

   @DefaultMessage("You have {0} messages and {1} notifications.")
   @AlternateMessage({
       "=0|=0", "You have no messages or notifications."
       "=0|one", "You have a notification."
       "one|=0", "You have a message."
       "one|one", "You have one message and one notification."
       "other|one", "You have {0} messages and one notification."
       "one|other", "You have one message and {1} notifications."
   })
   String messages(@PluralCount int msgCount,
       @PluralCount int notifyCount);
 
Note that the number of permutations can grow quickly, and that the default message is used when every Messages.PluralCount or Messages.Select would use the "other" value.

Summary

[Expand]
Inherited Methods
From interface java.lang.annotation.Annotation