@Override
    String sourceContentFor(String aSource, Boolean nullOnMissing) {
        if (this.sourcesContent == null) {
            return null;
        }

        if (this.sourceRoot != null) {
            aSource = Util.relative(this.sourceRoot, aSource);
        }

        if (this._sources.has(aSource)) {
            return this.sourcesContent.get(this._sources.indexOf(aSource));
        }

        ParsedUrl url;
        if (this.sourceRoot != null && ((url = Util.urlParse(this.sourceRoot)) != null)) {
            // XXX: file:// URIs and absolute paths lead to unexpected behavior for
            // many users. We can help them out when they expect file:// URIs to
            // behave like it would if they were running a local HTTP server. See
            // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
            String fileUriAbsPath = aSource.replaceAll("^file://", "");
            if (url.scheme.equals("file") && this._sources.has(fileUriAbsPath)) {
                return this.sourcesContent.get(this._sources.indexOf(fileUriAbsPath));
            }

            if ((url.path == null || url.path.equals("/")) && this._sources.has("/" + aSource)) {
                return this.sourcesContent.get(this._sources.indexOf("/" + aSource));
            }
        }

        // This function is used recursively from
        // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
        // don't want to throw if we can't find the source - we just want to
        // return null, so we provide a flag to exit gracefully.
        if (nullOnMissing != null && nullOnMissing) {
            return null;
        } else {
            throw new RuntimeException("\"" + aSource + "\" is not in the SourceMap.");
        }
    }
@ Override String sourceContentFor ( String aSource , Boolean nullOnMissing ) { if ( this . sourcesContent == null ) { return null ; } if ( this . sourceRoot != null ) { aSource = Util . relative ( this . sourceRoot , aSource ) ; } if ( this . _sources . has ( aSource ) ) { return this . sourcesContent . get ( this . _sources . indexOf ( aSource ) ) ; } ParsedUrl url ; if ( this . sourceRoot != null && ( ( url = Util . urlParse ( this . sourceRoot ) ) != null ) ) { String fileUriAbsPath = aSource . replaceAll ( "^file://" , "" ) ; if ( url . scheme . equals ( "file" ) && this . _sources . has ( fileUriAbsPath ) ) { return this . sourcesContent . get ( this . _sources . indexOf ( fileUriAbsPath ) ) ; } if ( ( url . path == null || url . path . equals ( "/" ) ) && this . _sources . has ( "/" + aSource ) ) { return this . sourcesContent . get ( this . _sources . indexOf ( "/" + aSource ) ) ; } } if ( nullOnMissing != null && nullOnMissing ) { return null ; } else { throw new RuntimeException ( "\"" + aSource + "\" is not in the SourceMap." ) ; } }
Returns the original source content. The only argument is the url of the original source file. Returns null if no original source content is
available.