Class FileResolution

java.lang.Object
com.jozufozu.flywheel.core.source.FileResolution

public class FileResolution extends Object
A reference to a source file that might not be loaded when the owning object is created.

FileResolutions are used primarily while parsing import statements. file is initially null, but will be populated later on, after all SourceFiles are loaded (assuming fileLoc references an actual file).

  • Method Details

    • getFileLoc

      public net.minecraft.resources.ResourceLocation getFileLoc()
    • getFile

      public SourceFile getFile()
      Non-null if this file is resolved because there would have been a crash otherwise.
      Returns:
      The file that this resolution resolves to.
    • addSpan

      public FileResolution addSpan(Span span)
      Store the given span so this resolution can know all the places that reference the file.

      Used for error reporting.

      Parameters:
      span - A span where this file is referenced.
    • addSpec

      public void addSpec(net.minecraft.resources.ResourceLocation name)