本文整理了Java中org.stringtemplate.v4.STGroup.loadGroupFile()
方法的一些代码示例,展示了STGroup.loadGroupFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。STGroup.loadGroupFile()
方法的具体详情如下:
包路径:org.stringtemplate.v4.STGroup
类名称:STGroup
方法名:loadGroupFile
[英]Load a group file with full path fileName; it's relative to root by prefix.
[中]加载具有完整路径文件名的组文件;它是相对于根的前缀。
代码示例来源:origin: com.facebook.swift/swift-generator
protected STGroup getTemplateGroupFromFile(String fileName) throws IOException
{
final URL resourceUrl = Resources.getResource(this.getClass(), "/templates/" + fileName);
STGroup stg = new STGroup();
stg.errMgr = new ErrorManager(ERROR_LISTENER);
stg.loadGroupFile("", resourceUrl.toExternalForm());
return stg;
}
代码示例来源:origin: com.almis.awe/awe-spring-boot-starter
/**
* Retrieve screens template group
*
* @return Partials template group
*/
@Bean
public STGroup screensTemplateGroup() {
STGroup group = new STGroup('$', '$');
for (String path : getPaths("screen/templates.stg")) {
group.loadGroupFile("", path);
}
return group;
}
代码示例来源:origin: com.almis.awe/awe-spring-boot-starter
/**
* Retrieve elements template group
*
* @return Partials template group
*/
@Bean
public STGroup elementsTemplateGroup() {
STGroup group = new STGroup('$', '$');
for (String path : getPaths("screen/elements.stg")) {
group.loadGroupFile("", path);
}
return group;
}
代码示例来源:origin: com.almis.awe/awe-spring-boot-starter
/**
* Retrieve help template group
*
* @return Partials template group
*/
@Bean
public STGroup helpTemplateGroup() {
STGroup group = new STGroup('$', '$');
for (String path : getPaths("screen/help.stg")) {
group.loadGroupFile("", path);
}
return group;
}
内容来源于网络,如有侵权,请联系作者删除!