Class NullGssSourceMapGenerator

java.lang.Object
com.google.common.css.compiler.passes.NullGssSourceMapGenerator
All Implemented Interfaces:
GssSourceMapGenerator

public final class NullGssSourceMapGenerator extends Object implements GssSourceMapGenerator
Null class implements GssSourceMapGenerator.
  • Constructor Details

    • NullGssSourceMapGenerator

      public NullGssSourceMapGenerator()
  • Method Details

    • appendOutputTo

      public void appendOutputTo(Appendable out, String name)
      Description copied from interface: GssSourceMapGenerator
      Appends the generated source map to out.
      Specified by:
      appendOutputTo in interface GssSourceMapGenerator
      Parameters:
      out - an Appendable object to append the output on
      name - filename to be written inside the source map (not the filename where writes at)
    • startSourceMapping

      public void startSourceMapping(CssNode node, int startLine, int startCharIndex)
      Description copied from interface: GssSourceMapGenerator
      Starts the source mapping for the given node at the current position. This is intended to be called before the node is written to the buffer.
      Specified by:
      startSourceMapping in interface GssSourceMapGenerator
      Parameters:
      node - the CssNode to be processed
      startLine - the first character's line number once it starts writing output
      startCharIndex - the first character's character index once it starts writing output
    • endSourceMapping

      public void endSourceMapping(CssNode node, int endLine, int endCharIndex)
      Description copied from interface: GssSourceMapGenerator
      Finishes the source mapping for the given node at the current position. This is intended to be called immediately after the whole node is written to the buffer.
      Specified by:
      endSourceMapping in interface GssSourceMapGenerator
      Parameters:
      node - the CssNode to be processed
      endLine - the last character's line number when it ends writing output
      endCharIndex - the last character's character index when it ends writing output or one less than the corresponding startCharIndex if a source mapping is empty.
    • setSourceRoot

      public void setSourceRoot(String path)
      Description copied from interface: GssSourceMapGenerator
      A prefix to be added to the beginning of each source file name. Debuggers expect (prefix + sourceName) to be a URL for loading the source code.
      Specified by:
      setSourceRoot in interface GssSourceMapGenerator
      Parameters:
      path - The URL prefix to save in the sourcemap file.