MCPcopy Create free account
hub / github.com/antlr/codebuff / getRootDirURL

Method getRootDirURL

output/java8/1.4.17/STGroupFile.java:161–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159 }
160
161 @Override
162 public URL getRootDirURL() {
163// System.out.println("url of "+fileName+" is "+url.toString());
164 String parent = Misc.stripLastPathElement(url.toString());
165 if ( parent.endsWith(".jar!") ) {
166 parent = parent+"/."; // whooops. at the root so add "current dir" after jar spec
167 }
168 try {
169 URL parentURL = new URL(parent);
170// System.out.println("parent URL "+parentURL.toString());
171 return parentURL;
172 }
173 catch (MalformedURLException mue) {
174 errMgr.runTimeError(null, null, ErrorType.INVALID_TEMPLATE_NAME, mue, parent);
175 }
176 return null;
177 }
178}

Callers

nothing calls this directly

Calls 3

stripLastPathElementMethod · 0.95
toStringMethod · 0.65
runTimeErrorMethod · 0.65

Tested by

no test coverage detected