MCPcopy Index your code
hub / github.com/antlr/codebuff / loadGroupFile

Method loadGroupFile

output/java8/1.4.13/STGroup.java:607–622  ·  view source on GitHub ↗

Load a group file with full path fileName; it's relative to root by prefix.

(String prefix, String fileName)

Source from the content-addressed store, hash-verified

605 /** Load a group file with full path {@code fileName}; it's relative to root by {@code prefix}. */
606
607 public void loadGroupFile(String prefix, String fileName) {
608 if ( verbose ) System.out.println(this.getClass().getSimpleName()+".loadGroupFile(group-file-prefix="+prefix+", fileName="+fileName+")");
609 GroupParser parser;
610 try {
611 URL f = new URL(fileName);
612 ANTLRInputStream fs = new ANTLRInputStream(f.openStream(), encoding);
613 GroupLexer lexer = new GroupLexer(fs);
614 fs.name = fileName;
615 CommonTokenStream tokens = new CommonTokenStream(lexer);
616 parser = new GroupParser(tokens);
617 parser.group(this, prefix);
618 }
619 catch (Exception e) {
620 errMgr.IOError(null, ErrorType.CANT_LOAD_GROUP_FILE, e, fileName);
621 }
622 }
623
624 /** Load template file into this group using absolute {@code fileName}. */
625

Callers 2

loadMethod · 0.45
loadMethod · 0.45

Calls 3

IOErrorMethod · 0.65
getSimpleNameMethod · 0.45
openStreamMethod · 0.45

Tested by

no test coverage detected