Module aya.cli.impl

Record Class DiskLibraryOwner

java.lang.Object
java.lang.Record
org.aya.cli.library.source.DiskLibraryOwner
All Implemented Interfaces:
LibraryOwner, MutableLibraryOwner

public record DiskLibraryOwner(@NotNull org.aya.util.error.SourceFileLocator locator, @NotNull kala.collection.mutable.MutableList<Path> modulePathMut, @NotNull kala.collection.mutable.MutableList<LibraryOwner> libraryDepsMut, @NotNull kala.collection.mutable.MutableList<LibrarySource> librarySourcesMut, @NotNull LibraryConfig underlyingLibrary) extends Record implements MutableLibraryOwner
A library that lives in the file system.
  • Constructor Details

    • DiskLibraryOwner

      public DiskLibraryOwner(@NotNull @NotNull org.aya.util.error.SourceFileLocator locator, @NotNull @NotNull kala.collection.mutable.MutableList<Path> modulePathMut, @NotNull @NotNull kala.collection.mutable.MutableList<LibraryOwner> libraryDepsMut, @NotNull @NotNull kala.collection.mutable.MutableList<LibrarySource> librarySourcesMut, @NotNull @NotNull LibraryConfig underlyingLibrary)
      Creates an instance of a DiskLibraryOwner record class.
      Parameters:
      locator - the value for the locator record component
      modulePathMut - the value for the modulePathMut record component
      libraryDepsMut - the value for the libraryDepsMut record component
      librarySourcesMut - the value for the librarySourcesMut record component
      underlyingLibrary - the value for the underlyingLibrary record component
  • Method Details

    • from

      @NotNull public static @NotNull DiskLibraryOwner from(@NotNull @NotNull LibraryConfig config) throws IOException
      Throws:
      IOException
    • 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.
      Specified by:
      locator in interface LibraryOwner
      Returns:
      the value of the locator record component
    • modulePathMut

      @NotNull public @NotNull kala.collection.mutable.MutableList<Path> modulePathMut()
      Returns the value of the modulePathMut record component.
      Specified by:
      modulePathMut in interface MutableLibraryOwner
      Returns:
      the value of the modulePathMut record component
    • libraryDepsMut

      @NotNull public @NotNull kala.collection.mutable.MutableList<LibraryOwner> libraryDepsMut()
      Returns the value of the libraryDepsMut record component.
      Specified by:
      libraryDepsMut in interface MutableLibraryOwner
      Returns:
      the value of the libraryDepsMut record component
    • librarySourcesMut

      @NotNull public @NotNull kala.collection.mutable.MutableList<LibrarySource> librarySourcesMut()
      Returns the value of the librarySourcesMut record component.
      Specified by:
      librarySourcesMut in interface MutableLibraryOwner
      Returns:
      the value of the librarySourcesMut record component
    • underlyingLibrary

      @NotNull public @NotNull LibraryConfig underlyingLibrary()
      Returns the value of the underlyingLibrary record component.
      Specified by:
      underlyingLibrary in interface LibraryOwner
      Returns:
      the value of the underlyingLibrary record component