public Map<String, URL> resolveInclusions() throws IOException { if (resolvedInclusions == null) { resolvedInclusions = new HashMap<String, URL>(); for (String source : sources) resolveInclusions(source, resolvedInclusions); } return resolvedInclusions; }
private void resolveInclusions(String source, Map<String, URL> ret) throws IOException { Collection<String> includedPaths = RegexUtils.find(source, includePattern, 1); // System.out.println("Included paths = " + includedPaths); for (String includedPath : includedPaths) { if (ret.containsKey(includedPath)) continue; URL url = getIncludedSourceURL(includedPath); if (url == null) { assert log(Level.SEVERE, "Failed to resolve include '" + includedPath + "'"); } else { String s = ReadText.readText(url); ret.put(includedPath, url); resolveInclusions(s, ret); } } }