private static void appendFieldStart(Appendable out, String name) throws IOException { appendFieldStart(out, name, false); }
private static void appendField( Appendable out, String name, CharSequence value) throws IOException { appendFieldStart(out, name, false); out.append(value); }
private static void appendFirstField( Appendable out, String name, CharSequence value) throws IOException { appendFieldStart(out, name, true); out.append(value); }
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); }
appendFieldStart(out, "mappings"); appendFieldStart(out, "sources"); out.append("["); addSourceNameMap(out); appendFieldStart(out, "names"); out.append("["); addSymbolNameMap(out);
appendFieldStart(out, "mappings"); appendFieldStart(out, "sources"); out.append("["); addSourceNameMap(out); appendFieldStart(out, "names"); out.append("["); addSymbolNameMap(out);
appendFieldStart(out, "sections"); out.append("[\n"); boolean first = true; appendFieldStart(out, "offset", true); appendOffsetValue(out, section.getLine(), section.getColumn()); if (section.getSectionType() == SourceMapSection.SectionType.URL) {
appendFieldStart(out, "sections"); out.append("[\n"); boolean first = true;