Map<String,String> pluralKey2defaultValue = new HashMap<String,String>(); if (pluralTextAnnotation != null) { String[] pairs = pluralTextAnnotation.value(); for(int i=0; (i+1)<pairs.length; i+=2) { pluralKey2defaultValue.put(pairs[i], pairs[i+1]);
.getAnnotation(com.google.gwt.i18n.client.Messages.PluralText.class); if (pluralText != null) { String[] pluralForms = pluralText.value(); if ((pluralForms.length & 1) != 0) { throw new AnnotationsError(
.getAnnotation(com.google.gwt.i18n.client.Messages.PluralText.class); if (pluralText != null) { String[] pluralForms = pluralText.value(); if ((pluralForms.length & 1) != 0) { throw new AnnotationsError(
defaults = annotation.value();
/** * Get the alternate message forms from either an AlternateMessages annotation * or a PluralText annotation. */ @SuppressWarnings("deprecation") protected String[] getAlternateMessages() { AlternateMessage altMsgAnnot = getAnnotation(AlternateMessage.class); if (altMsgAnnot != null) { return altMsgAnnot.value(); } // avoid deprecation warning for the import com.google.gwt.i18n.client.Messages.PluralText pluralTextAnnot = getAnnotation(com.google.gwt.i18n.client.Messages.PluralText.class); if (pluralTextAnnot != null) { return pluralTextAnnot.value(); } return null; }
/** * Get the alternate message forms from either an AlternateMessages annotation * or a PluralText annotation. */ @SuppressWarnings("deprecation") protected String[] getAlternateMessages() { AlternateMessage altMsgAnnot = getAnnotation(AlternateMessage.class); if (altMsgAnnot != null) { return altMsgAnnot.value(); } // avoid deprecation warning for the import com.google.gwt.i18n.client.Messages.PluralText pluralTextAnnot = getAnnotation(com.google.gwt.i18n.client.Messages.PluralText.class); if (pluralTextAnnot != null) { return pluralTextAnnot.value(); } return null; }
private String[] getMessageAnnotationValues(Annotation messageAnnotation) { if (messageAnnotation instanceof AlternateMessage) { return ((AlternateMessage) messageAnnotation).value(); } else if (messageAnnotation instanceof PluralText) { return ((PluralText) messageAnnotation).value(); } return null; }
private String[] getMessageAnnotationValues(Annotation messageAnnotation) { if (messageAnnotation instanceof AlternateMessage) { return ((AlternateMessage) messageAnnotation).value(); } else if (messageAnnotation instanceof PluralText) { return ((PluralText) messageAnnotation).value(); } return null; }
/** * Get the alternate message forms from either an AlternateMessages annotation * or a PluralText annotation. */ @SuppressWarnings("deprecation") protected String[] getAlternateMessages() { AlternateMessage altMsgAnnot = getAnnotation(AlternateMessage.class); if (altMsgAnnot != null) { return altMsgAnnot.value(); } // avoid deprecation warning for the import com.google.gwt.i18n.client.Messages.PluralText pluralTextAnnot = getAnnotation(com.google.gwt.i18n.client.Messages.PluralText.class); if (pluralTextAnnot != null) { return pluralTextAnnot.value(); } return null; }