本文整理汇总了Java中org.antlr.stringtemplate.CommonGroupLoader类的典型用法代码示例。如果您正苦于以下问题:Java CommonGroupLoader类的具体用法?Java CommonGroupLoader怎么用?Java CommonGroupLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CommonGroupLoader类属于org.antlr.stringtemplate包,在下文中一共展示了CommonGroupLoader类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: TemplateTypeBuilder
import org.antlr.stringtemplate.CommonGroupLoader; //导入依赖的package包/类
public TemplateTypeBuilder(TypeSpecification spec) {
CommonGroupLoader loader = new CommonGroupLoader("org/lemurproject/galago/tupleflow/templates", null);
StringTemplateGroup.registerGroupLoader(loader);
StringTemplateGroup.registerDefaultLexer(AngleBracketTemplateLexer.class);
this.template = StringTemplateGroup.loadGroup("GalagoType");
this.typeName = spec.getTypeName();
this.typePackage = spec.getPackageName();
this.typeFields = new ArrayList<Field>();
this.typeOrders = new ArrayList<OrderSpec>();
for (FieldSpecification fieldSpec : spec.getFields()) {
Field field = new Field(fieldSpec.getType(), fieldSpec.getName());
typeFields.add(field);
}
for (OrderSpecification orderSpec : spec.getOrders()) {
OrderSpec order = new OrderSpec(orderSpec, typeFields);
typeOrders.add(order);
}
}
开发者ID:teanalab,项目名称:demidovii,代码行数:22,代码来源:TemplateTypeBuilder.java
示例2: TemplateTypeBuilder
import org.antlr.stringtemplate.CommonGroupLoader; //导入依赖的package包/类
public TemplateTypeBuilder(TypeSpecification spec) {
CommonGroupLoader loader = new CommonGroupLoader("org/galagosearch/tupleflow/templates", null);
StringTemplateGroup.registerGroupLoader(loader);
StringTemplateGroup.registerDefaultLexer(AngleBracketTemplateLexer.class);
this.template = StringTemplateGroup.loadGroup("GalagoType");
this.typeName = spec.getTypeName();
this.typePackage = spec.getPackageName();
this.typeFields = new ArrayList<Field>();
this.typeOrders = new ArrayList<OrderSpec>();
for (FieldSpecification fieldSpec : spec.getFields()) {
Field field = new Field(fieldSpec.getType(), fieldSpec.getName());
typeFields.add(field);
}
for (OrderSpecification orderSpec : spec.getOrders()) {
OrderSpec order = new OrderSpec(orderSpec, typeFields);
typeOrders.add(order);
}
}
开发者ID:jjfiv,项目名称:galagosearch,代码行数:22,代码来源:TemplateTypeBuilder.java
示例3: compile
import org.antlr.stringtemplate.CommonGroupLoader; //导入依赖的package包/类
public void compile() throws IOException{
String junitFileName;
if ( grammarInfo.getTreeGrammarName()!=null ) {
junitFileName = "Test"+grammarInfo.getTreeGrammarName();
}
else {
junitFileName = "Test"+grammarInfo.getGrammarName();
}
String lexerName = grammarInfo.getGrammarName()+"Lexer";
String parserName = grammarInfo.getGrammarName()+"Parser";
StringTemplateGroupLoader loader = new CommonGroupLoader("org/antlr/gunit", null);
StringTemplateGroup.registerGroupLoader(loader);
StringTemplateGroup.registerDefaultLexer(AngleBracketTemplateLexer.class);
StringBuffer buf = compileToBuffer(junitFileName, lexerName, parserName);
writeTestFile(".", junitFileName+".java", buf.toString());
}
开发者ID:pcingola,项目名称:jFuzzyLogic,代码行数:18,代码来源:JUnitCodeGen.java
示例4: getTemplateGroup
import org.antlr.stringtemplate.CommonGroupLoader; //导入依赖的package包/类
private StringTemplateGroup getTemplateGroup() {
StringTemplateGroupLoader loader = new CommonGroupLoader("org/antlr/gunit", null);
StringTemplateGroup.registerGroupLoader(loader);
StringTemplateGroup.registerDefaultLexer(AngleBracketTemplateLexer.class);
StringTemplateGroup group = StringTemplateGroup.loadGroup("gUnitTestResult");
return group;
}
开发者ID:pcingola,项目名称:jFuzzyLogic,代码行数:8,代码来源:gUnitExecuter.java
注:本文中的org.antlr.stringtemplate.CommonGroupLoader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论