@Retention(value=RUNTIME) @Target(value=PARAMETER) public static @interface Messages.PluralCount
This annotation is applied to a single parameter of a Messages subinterface and indicates that parameter is to be used to choose the proper plural form of the message. The parameter chosen must be of type short or int.
Optionally, a class literal referring to a PluralRule implementation can be supplied as the argument if the standard implementation is insufficient.
Example:
@DefaultMessage("You have {0} widgets.")
@AlternateMessage({"one", "You have one widget."})
String example(@PluralCount int count)
| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends PluralRule> |
value
The PluralRule implementation to use for this message.
|
public abstract Class<? extends PluralRule> value
PluralRule.class is used as a default value here, which will be replaced during
code generation with the default implementation.
Copyright © 2018–2020. All rights reserved.