Class FallbackVirtualFile

java.lang.Object
xsbti.BasicVirtualFileRef
dotty.tools.xsbt.FallbackVirtualFile
All Implemented Interfaces:
xsbti.VirtualFile, xsbti.VirtualFileRef
Direct Known Subclasses:
FallbackPathBasedFile

public class FallbackVirtualFile extends xsbti.BasicVirtualFileRef implements xsbti.VirtualFile
A basic implementation of VirtualFile that is only used when the real virtual file can not be found. This has a very basic implementation of contentHash that is almost certainly colliding more than the implementation in Zinc. It does not matter anyway as Zinc will recompile the associated source file, because it did not recieve the same virtual file back.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final dotty.tools.dotc.util.SourceFile
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FallbackVirtualFile(dotty.tools.dotc.util.SourceFile sourceFile)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
     

    Methods inherited from class xsbti.BasicVirtualFileRef

    equals, hashCode, id, name, names, toString, withId

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface xsbti.VirtualFileRef

    id, name, names
  • Field Details

    • sourceFile

      protected final dotty.tools.dotc.util.SourceFile sourceFile
  • Constructor Details

    • FallbackVirtualFile

      public FallbackVirtualFile(dotty.tools.dotc.util.SourceFile sourceFile)
  • Method Details

    • input

      public InputStream input()
      Specified by:
      input in interface xsbti.VirtualFile
    • contentHash

      public long contentHash()
      Specified by:
      contentHash in interface xsbti.VirtualFile