private void parseMetaMap(
      SourceMapObject sourceMapObject, SourceMapSupplier sectionSupplier)
      throws SourceMapParseException {
    if (sectionSupplier == null) {
      sectionSupplier = new DefaultSourceMapSupplier();
    }

    try {
      if (sourceMapObject.getLineCount() >= 0
          || sourceMapObject.getMappings() != null
          || sourceMapObject.getSources() != null
          || sourceMapObject.getNames() != null) {
        throw new SourceMapParseException("Invalid map format");
      }

      // Build up a new source map in a new generator using the mappings of this metamap. The new
      // map will be rendered to JSON and then parsed using this consumer.
      SourceMapGeneratorV3 generator = new SourceMapGeneratorV3();
      for (SourceMapSection section : sourceMapObject.getSections()) {
        String mapSectionContents = section.getSectionValue();
        if (section.getSectionType() == SourceMapSection.SectionType.URL) {
          mapSectionContents = sectionSupplier.getSourceMap(section.getSectionValue());
        }
        if (mapSectionContents == null) {
          throw new SourceMapParseException("Unable to retrieve: " + section.getSectionValue());
        }
        generator.mergeMapSection(section.getLine(), section.getColumn(), mapSectionContents);
      }

      StringBuilder sb = new StringBuilder();
      generator.appendTo(sb, sourceMapObject.getFile());
      parse(sb.toString());

    } catch (IOException ex) {
      throw new SourceMapParseException("IO exception: " + ex);
    }
  }
private void parseMetaMap ( SourceMapObject sourceMapObject , SourceMapSupplier sectionSupplier ) throws SourceMapParseException { if ( sectionSupplier == null ) { sectionSupplier = new DefaultSourceMapSupplier ( ) ; } try { if ( sourceMapObject . getLineCount ( ) >= 0 || sourceMapObject . getMappings ( ) != null || sourceMapObject . getSources ( ) != null || sourceMapObject . getNames ( ) != null ) { throw new SourceMapParseException ( "Invalid map format" ) ; } SourceMapGeneratorV3 generator = new SourceMapGeneratorV3 ( ) ; for ( SourceMapSection section : sourceMapObject . getSections ( ) ) { String mapSectionContents = section . getSectionValue ( ) ; if ( section . getSectionType ( ) == SourceMapSection . SectionType . URL ) { mapSectionContents = sectionSupplier . getSourceMap ( section . getSectionValue ( ) ) ; } if ( mapSectionContents == null ) { throw new SourceMapParseException ( "Unable to retrieve: " + section . getSectionValue ( ) ) ; } generator . mergeMapSection ( section . getLine ( ) , section . getColumn ( ) , mapSectionContents ) ; } StringBuilder sb = new StringBuilder ( ) ; generator . appendTo ( sb , sourceMapObject . getFile ( ) ) ; parse ( sb . toString ( ) ) ; } catch ( IOException ex ) { throw new SourceMapParseException ( "IO exception: " + ex ) ; } }
@param sourceMapObject
@throws SourceMapParseException