本文整理汇总了Java中system.proxies.Language类的典型用法代码示例。如果您正苦于以下问题:Java Language类的具体用法?Java Language怎么用?Java Language使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Language类属于system.proxies包,在下文中一共展示了Language类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDefaultLanguage
import system.proxies.Language; //导入依赖的package包/类
/**
* Get the default language
* @param context
* @return The default language
* @throws CoreException
*/
public static Language getDefaultLanguage(IContext context) throws CoreException {
String languageCode = Core.getDefaultLanguage().getCode();
List<Language> languageList = Language.load(context, "[Code = '" + languageCode + "']");
if (languageList == null || languageList.isEmpty()) {
throw new RuntimeException("No language found for default language constant value " + languageCode);
}
return languageList.get(0);
}
示例2: executeAction
import system.proxies.Language; //导入依赖的package包/类
@Override
public IMendixObject executeAction() throws Exception
{
// BEGIN USER CODE
Language defaultLanguage = Misc.getDefaultLanguage(getContext());
return defaultLanguage.getMendixObject();
// END USER CODE
}
示例3: cacheLanguageCodes
import system.proxies.Language; //导入依赖的package包/类
private void cacheLanguageCodes(IContext context) throws CoreException
{
for(IMendixObject language : Core.retrieveXPathQuery(context, "//" + Language.entityName))
this.languageCodes.add(Language.initialize(context, language).getCode());
}