本文整理匯總了Java中com.google.gwt.i18n.client.Messages類的典型用法代碼示例。如果您正苦於以下問題:Java Messages類的具體用法?Java Messages怎麽用?Java Messages使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Messages類屬於com.google.gwt.i18n.client包,在下文中一共展示了Messages類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getStrutsActions
import com.google.gwt.i18n.client.Messages; //導入依賴的package包/類
private Map<String, String> getStrutsActions(Object proxy, Class<? extends LocalizedLookupDispatchAction> apply) throws Throwable {
Map<String, String> ret = new HashMap<String, String>();
for (Method m: iMessages.getDeclaredMethods()) {
if (m.getParameterTypes().length > 0) continue;
org.unitime.localization.messages.Messages.StrutsAction action = m.getAnnotation(org.unitime.localization.messages.Messages.StrutsAction.class);
if (action != null) {
Messages.DefaultMessage dm = m.getAnnotation(Messages.DefaultMessage.class);
if (action.apply() == null || action.apply().length == 0) {
try {
if (apply.getMethod(action.value(), new Class<?>[] {
ActionMapping.class, ActionForm.class, HttpServletRequest.class, HttpServletResponse.class
}) != null) {
ret.put((String)invoke(proxy, m, new Object[] {}), action.value());
if (dm != null)
ret.put(dm.value(), action.value());
}
} catch (NoSuchMethodException e) {}
} else {
for (Class<? extends LocalizedLookupDispatchAction> a: action.apply())
if (a.equals(apply)) {
ret.put((String)invoke(proxy, m, new Object[] {}), action.value());
if (dm != null)
ret.put(dm.value(), action.value());
}
}
}
}
return ret;
}
示例2: pullRequestUrlTemplate
import com.google.gwt.i18n.client.Messages; //導入依賴的package包/類
@Messages.DefaultMessage("https://{0}.visualstudio.com/{1}/{2}/_git/{3}/pullrequest/{4}")
@Key("pullRequestUrlTemplateWithProjectAndRepo")
String pullRequestUrlTemplate(
String accountName,
String collection,
String username,
String repository,
String pullRequestNumber);
示例3: shouldGenerateHashCodeForMessages
import com.google.gwt.i18n.client.Messages; //導入依賴的package包/類
@Test
public void shouldGenerateHashCodeForMessages() {
SampleMessages messages = GWT.create(SampleMessages.class);
SampleMessages2 messages2 = GWT.create(SampleMessages2.class);
final Set<Messages> set = new HashSet<>();
set.add(messages);
set.add(messages2);
assertEquals(2, set.size());
set.add(messages);
assertEquals(2, set.size());
}
示例4: httpUrlTemplate
import com.google.gwt.i18n.client.Messages; //導入依賴的package包/類
@Messages.DefaultMessage("https://{0}.visualstudio.com/{1}/_git/{2}.git")
String httpUrlTemplate(String accountName, String collection, String repository);
示例5: Messages
import com.google.gwt.i18n.client.Messages; //導入依賴的package包/類
String Messages();