private static void addNameMap(Appendable out, Map<String, Integer> map) throws IOException { int i = 0; for (Entry<String, Integer> entry : map.entrySet()) { String key = entry.getKey(); if (i != 0) { out.append(","); } out.append(escapeString(key)); i++; } }
private static void addNameMap(Appendable out, Map<String, Integer> map) throws IOException { int i = 0; for (Entry<String, Integer> entry : map.entrySet()) { String key = entry.getKey(); if (i != 0) { out.append(","); } out.append(escapeString(key)); i++; } }
private void addSourcesContentMap(Appendable out) throws IOException { boolean found = false; int size = sourceFileMap.size(); List<String> contents = new ArrayList<>(size); contents.addAll(Collections.nCopies(size, "")); for (Map.Entry<String, String> entry : sourceFileContentMap.entrySet()) { Integer index = sourceFileMap.get(entry.getKey()); if (index != null && index < size) { contents.set(index, entry.getValue()); found = true; } } if (!found) { return; } appendFieldStart(out, "sourcesContent"); out.append("["); for (int i = 0; i < size; i++) { if (i != 0) { out.append(","); } out.append(escapeString(contents.get(i))); } out.append("]"); appendFieldEnd(out); }
appendField(out, "file", escapeString(name)); appendField(out, "lineCount", String.valueOf(maxLine)); appendField(out, "sourceRoot", escapeString(this.sourceRootPath)); String value; if (objValue instanceof String) { value = escapeString((String) objValue); // escapes native String } else { value = objValue.toString();
appendField(out, "file", escapeString(name)); appendOffsetValue(out, section.getLine(), section.getColumn()); if (section.getSectionType() == SourceMapSection.SectionType.URL) { appendField(out, "url", escapeString(section.getSectionValue())); } else if (section.getSectionType() == SourceMapSection.SectionType.MAP) { appendField(out, "map", section.getSectionValue());
appendField(out, "file", escapeString(name)); offsetValue(section.getLine(), section.getColumn())); if (section.getSectionType() == SourceMapSection.SectionType.URL) { appendField(out, "url", escapeString(section.getSectionValue())); } else if (section.getSectionType() == SourceMapSection.SectionType.MAP) { appendField(out, "map", section.getSectionValue());
appendField(out, "file", escapeString(name)); appendField(out, "lineCount", String.valueOf(maxLine)); appendField(out, "sourceRoot", escapeString(this.sourceRootPath));