本文整理汇总了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();