Module aya.cli.impl

Record Class LibrarySource

java.lang.Object
java.lang.Record
org.aya.cli.library.source.LibrarySource
Record Components:
program - initialized after parse
tycked - initialized after tyck
resolveInfo - initialized after resolve
All Implemented Interfaces:
org.aya.concrete.GenericAyaFile

public record LibrarySource(@NotNull LibraryOwner owner, @NotNull Path underlyingFile, @NotNull kala.collection.mutable.MutableList<LibrarySource> imports, @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt>> program, @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>> tycked, @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> resolveInfo) extends Record implements org.aya.concrete.GenericAyaFile
A source file may or may not be tycked.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.aya.concrete.GenericAyaFile

    org.aya.concrete.GenericAyaFile.Factory
  • Constructor Summary

    Constructors
    Constructor
    Description
    LibrarySource(@NotNull LibraryOwner owner, @NotNull Path file)
     
    LibrarySource(@NotNull LibraryOwner owner, @NotNull Path underlyingFile, @NotNull kala.collection.mutable.MutableList<LibrarySource> imports, @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt>> program, @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>> tycked, @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> resolveInfo)
    Creates an instance of a LibrarySource record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Path
     
    @NotNull Path
     
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    @NotNull kala.collection.mutable.MutableList<LibrarySource>
    Returns the value of the imports record component.
    @NotNull kala.collection.immutable.ImmutableSeq<String>
     
    @NotNull org.aya.util.error.SourceFile
     
    @NotNull LibraryOwner
    Returns the value of the owner record component.
    @NotNull kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt>
    parseMe(@NotNull org.aya.concrete.GenericAyaParser parser)
     
    @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt>>
    Returns the value of the program record component.
    @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo>
    Returns the value of the resolveInfo record component.
    @NotNull org.aya.util.error.SourceFile
    toSourceFile(@NotNull String sourceCode)
     
    Returns a string representation of this record class.
    @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>>
    Returns the value of the tycked record component.
    @NotNull Path
    Returns the value of the underlyingFile record component.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.aya.concrete.GenericAyaFile

    codeFile, literate
  • Constructor Details

    • LibrarySource

      public LibrarySource(@NotNull @NotNull LibraryOwner owner, @NotNull @NotNull Path file)
    • LibrarySource

      public LibrarySource(@NotNull @NotNull LibraryOwner owner, @NotNull @NotNull Path underlyingFile, @NotNull @NotNull kala.collection.mutable.MutableList<LibrarySource> imports, @NotNull @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt>> program, @NotNull @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>> tycked, @NotNull @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> resolveInfo)
      Creates an instance of a LibrarySource record class.
      Parameters:
      owner - the value for the owner record component
      underlyingFile - the value for the underlyingFile record component
      imports - the value for the imports record component
      program - the value for the program record component
      tycked - the value for the tycked record component
      resolveInfo - the value for the resolveInfo record component
  • Method Details

    • moduleName

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<String> moduleName()
    • displayPath

      @NotNull public @NotNull Path displayPath()
    • toSourceFile

      @NotNull public @NotNull org.aya.util.error.SourceFile toSourceFile(@NotNull @NotNull String sourceCode)
    • parseMe

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt> parseMe(@NotNull @NotNull org.aya.concrete.GenericAyaParser parser) throws IOException
      Specified by:
      parseMe in interface org.aya.concrete.GenericAyaFile
      Throws:
      IOException
    • originalFile

      @NotNull public @NotNull org.aya.util.error.SourceFile originalFile() throws IOException
      Specified by:
      originalFile in interface org.aya.concrete.GenericAyaFile
      Throws:
      IOException
    • compiledCorePath

      @NotNull public @NotNull Path compiledCorePath()
    • toString

      public 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
    • equals

      public 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.
    • hashCode

      public 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
    • owner

      @NotNull public @NotNull LibraryOwner owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • underlyingFile

      @NotNull public @NotNull Path underlyingFile()
      Returns the value of the underlyingFile record component.
      Returns:
      the value of the underlyingFile record component
    • imports

      @NotNull public @NotNull kala.collection.mutable.MutableList<LibrarySource> imports()
      Returns the value of the imports record component.
      Returns:
      the value of the imports record component
    • program

      @NotNull public @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt>> program()
      Returns the value of the program record component.
      Returns:
      the value of the program record component
    • tycked

      @NotNull public @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>> tycked()
      Returns the value of the tycked record component.
      Returns:
      the value of the tycked record component
    • resolveInfo

      @NotNull public @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> resolveInfo()
      Returns the value of the resolveInfo record component.
      Returns:
      the value of the resolveInfo record component