Module aya.base

Record Class FileModuleLoader

java.lang.Object
java.lang.Record
org.aya.resolve.module.FileModuleLoader
All Implemented Interfaces:
ModuleLoader, Problematic

public record FileModuleLoader(@NotNull org.aya.util.error.SourceFileLocator locator, @NotNull Path basePath, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull org.aya.syntax.GenericAyaParser parser, org.aya.syntax.GenericAyaFile.Factory fileManager, @NotNull PrimFactory primFactory) extends Record implements ModuleLoader
  • Constructor Summary

    Constructors
    Constructor
    Description
    FileModuleLoader(@NotNull org.aya.util.error.SourceFileLocator locator, @NotNull Path basePath, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull org.aya.syntax.GenericAyaParser parser, org.aya.syntax.GenericAyaFile.Factory fileManager)
     
    FileModuleLoader(@NotNull org.aya.util.error.SourceFileLocator locator, @NotNull Path basePath, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull org.aya.syntax.GenericAyaParser parser, org.aya.syntax.GenericAyaFile.Factory fileManager, @NotNull PrimFactory primFactory)
    Creates an instance of a FileModuleLoader record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Path
    Returns the value of the basePath record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    existsFileLevelModule(@NotNull org.aya.syntax.ref.ModulePath path)
     
    org.aya.syntax.GenericAyaFile.Factory
    Returns the value of the fileManager record component.
    static void
    handleInternalError(@NotNull org.aya.util.error.Panic e)
     
    final int
    Returns a hash code value for this object.
    @Nullable ResolveInfo
    load(@NotNull org.aya.syntax.ref.ModulePath path, @NotNull ModuleLoader recurseLoader)
     
    @NotNull org.aya.util.error.SourceFileLocator
    Returns the value of the locator record component.
    @NotNull org.aya.syntax.GenericAyaParser
    Returns the value of the parser record component.
    @NotNull PrimFactory
    Returns the value of the primFactory record component.
    @NotNull org.aya.util.reporter.Reporter
    Returns the value of the reporter record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.aya.resolve.module.ModuleLoader

    load, resolveModule, resolveModule, tyckModule, tyckModule

    Methods inherited from interface org.aya.tyck.tycker.Problematic

    fail, fail, fail
  • Constructor Details

    • FileModuleLoader

      public FileModuleLoader(@NotNull @NotNull org.aya.util.error.SourceFileLocator locator, @NotNull @NotNull Path basePath, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull org.aya.syntax.GenericAyaParser parser, @NotNull org.aya.syntax.GenericAyaFile.Factory fileManager)
    • FileModuleLoader

      public FileModuleLoader(@NotNull @NotNull org.aya.util.error.SourceFileLocator locator, @NotNull @NotNull Path basePath, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull org.aya.syntax.GenericAyaParser parser, @NotNull org.aya.syntax.GenericAyaFile.Factory fileManager, @NotNull @NotNull PrimFactory primFactory)
      Creates an instance of a FileModuleLoader record class.
      Parameters:
      locator - the value for the locator record component
      basePath - the value for the basePath record component
      reporter - the value for the reporter record component
      parser - the value for the parser record component
      fileManager - the value for the fileManager record component
      primFactory - the value for the primFactory record component
  • Method Details

    • load

      @Nullable public @Nullable ResolveInfo load(@NotNull @NotNull org.aya.syntax.ref.ModulePath path, @NotNull @NotNull ModuleLoader recurseLoader)
      Specified by:
      load in interface ModuleLoader
    • existsFileLevelModule

      public boolean existsFileLevelModule(@NotNull @NotNull org.aya.syntax.ref.ModulePath path)
      Specified by:
      existsFileLevelModule in interface ModuleLoader
      Returns:
      if there is a module with path , which can be untycked
    • handleInternalError

      public static void handleInternalError(@NotNull @NotNull org.aya.util.error.Panic e)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • locator

      @NotNull public @NotNull org.aya.util.error.SourceFileLocator locator()
      Returns the value of the locator record component.
      Returns:
      the value of the locator record component
    • basePath

      @NotNull public @NotNull Path basePath()
      Returns the value of the basePath record component.
      Returns:
      the value of the basePath record component
    • reporter

      @NotNull public @NotNull org.aya.util.reporter.Reporter reporter()
      Returns the value of the reporter record component.
      Specified by:
      reporter in interface Problematic
      Returns:
      the value of the reporter record component
    • parser

      @NotNull public @NotNull org.aya.syntax.GenericAyaParser parser()
      Returns the value of the parser record component.
      Returns:
      the value of the parser record component
    • fileManager

      @NotNull public org.aya.syntax.GenericAyaFile.Factory fileManager()
      Returns the value of the fileManager record component.
      Returns:
      the value of the fileManager record component
    • primFactory

      @NotNull public @NotNull PrimFactory primFactory()
      Returns the value of the primFactory record component.
      Returns:
      the value of the primFactory record component