Class SourceCode

java.lang.Object
com.google.common.css.SourceCode
All Implemented Interfaces:
Serializable

public final class SourceCode extends Object implements Serializable
This is a wrapper for a file that will be compiled. It conveniently stores both the file name and the file contents, so that the parser does not have to deal with IO.

Instances of this class are immutable.

See Also:
  • Constructor Details

    • SourceCode

      public SourceCode(@Nullable String fileName, @Nullable String fileContents)
      Constructs a SourceCode. At least one of fileName and fileContents must be non-null.
      Parameters:
      fileName - the name of the source code file or null if the input does not come from a file
      fileContents - the contents of the source code file or null if the file contents is not yet known (the file has not yet been read)
  • Method Details

    • getFileName

      public String getFileName()
    • getFileContents

      public String getFileContents()