Module aya.base

Record Class FileModuleLoader

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

public record FileModuleLoader(@NotNull org.aya.util.error.SourceFileLocator locator, @NotNull Path basePath, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull GenericAyaParser parser, GenericAyaFile.Factory fileManager, PrimDef.Factory primFactory, @Nullable Trace.Builder builder) extends Record implements ModuleLoader
  • 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 GenericAyaParser parser, @NotNull GenericAyaFile.Factory fileManager, @NotNull PrimDef.Factory primFactory, @Nullable Trace.Builder builder)
      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
      builder - the value for the builder record component
  • Method Details

    • load

      @Nullable public @Nullable ResolveInfo load(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<@NotNull String> path, @NotNull @NotNull ModuleLoader recurseLoader)
      Specified by:
      load in interface ModuleLoader
    • handleInternalError

      public static void handleInternalError(@NotNull @NotNull InternalException 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 ModuleLoader
      Returns:
      the value of the reporter record component
    • parser

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

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

      @NotNull public PrimDef.Factory primFactory()
      Returns the value of the primFactory record component.
      Returns:
      the value of the primFactory record component
    • builder

      public @Nullable Trace.Builder builder()
      Returns the value of the builder record component.
      Returns:
      the value of the builder record component