java.lang.Object
java.lang.Record
org.aya.cli.library.source.LibrarySource
- Record Components:
program- initialized after parsetycked- initialized after tyckresolveInfo- initialized after resolve
- All Implemented Interfaces:
org.aya.syntax.GenericAyaFile
public record LibrarySource(@NotNull LibraryOwner owner, @NotNull Path underlyingFile, boolean isLiterate, @NotNull kala.collection.mutable.MutableList<LibrarySource> imports, @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt>> program, @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef>> tycked, @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> resolveInfo, @NotNull kala.value.MutableValue<LiterateData> literateData)
extends Record
implements org.aya.syntax.GenericAyaFile
A source file may or may not be tycked.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.syntax.GenericAyaFile
org.aya.syntax.GenericAyaFile.Factory -
Constructor Summary
ConstructorsConstructorDescriptionLibrarySource(@NotNull LibraryOwner owner, @NotNull Path underlyingFile, boolean isLiterate, @NotNull kala.collection.mutable.MutableList<LibrarySource> imports, @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt>> program, @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef>> tycked, @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> resolveInfo, @NotNull kala.value.MutableValue<LiterateData> literateData) Creates an instance of aLibrarySourcerecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.aya.util.error.SourceFilecodeFile()@NotNull Pathstatic @NotNull LibrarySourcecreate(@NotNull LibraryOwner owner, @NotNull Path file) @NotNull PathbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@NotNull kala.collection.mutable.MutableList<LibrarySource> imports()Returns the value of theimportsrecord component.booleanReturns the value of theisLiteraterecord component.@NotNull org.aya.literate.Literateliterate()@NotNull kala.value.MutableValue<LiterateData> Returns the value of theliterateDatarecord component.@NotNull org.aya.syntax.ref.ModulePathvoidnotifyTycked(@NotNull org.aya.resolve.ResolveInfo moduleResolve, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef> tycked) @NotNull org.aya.util.error.SourceFile@NotNull org.aya.util.error.SourceFileoriginalFile(@NotNull String sourceCode) @NotNull LibraryOwnerowner()Returns the value of theownerrecord component.@NotNull kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt> parseMe(@NotNull org.aya.syntax.GenericAyaParser parser) @NotNull org.aya.pretty.doc.Docpretty(@NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.reporter.Problem> problems, @NotNull org.aya.util.prettier.PrettierOptions options) @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt>> program()Returns the value of theprogramrecord component.@NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> Returns the value of theresolveInforecord component.toString()Returns a string representation of this record class.@NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef>> tycked()Returns the value of thetyckedrecord component.@NotNull PathReturns the value of theunderlyingFilerecord component.
-
Constructor Details
-
LibrarySource
public LibrarySource(@NotNull @NotNull LibraryOwner owner, @NotNull @NotNull Path underlyingFile, boolean isLiterate, @NotNull @NotNull kala.collection.mutable.MutableList<LibrarySource> imports, @NotNull @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt>> program, @NotNull @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef>> tycked, @NotNull @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> resolveInfo, @NotNull @NotNull kala.value.MutableValue<LiterateData> literateData) Creates an instance of aLibrarySourcerecord class.- Parameters:
owner- the value for theownerrecord componentunderlyingFile- the value for theunderlyingFilerecord componentisLiterate- the value for theisLiteraterecord componentimports- the value for theimportsrecord componentprogram- the value for theprogramrecord componenttycked- the value for thetyckedrecord componentresolveInfo- the value for theresolveInforecord componentliterateData- the value for theliterateDatarecord component
-
-
Method Details
-
create
@NotNull public static @NotNull LibrarySource create(@NotNull @NotNull LibraryOwner owner, @NotNull @NotNull Path file) -
moduleName
@NotNull public @NotNull org.aya.syntax.ref.ModulePath moduleName() -
displayPath
-
notifyTycked
public void notifyTycked(@NotNull @NotNull org.aya.resolve.ResolveInfo moduleResolve, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef> tycked) -
pretty
@NotNull public @NotNull org.aya.pretty.doc.Doc pretty(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.reporter.Problem> problems, @NotNull @NotNull org.aya.util.prettier.PrettierOptions options) throws IOException - Throws:
IOException
-
parseMe
@NotNull public @NotNull kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt> parseMe(@NotNull @NotNull org.aya.syntax.GenericAyaParser parser) throws IOException - Specified by:
parseMein interfaceorg.aya.syntax.GenericAyaFile- Throws:
IOException
-
literate
- Specified by:
literatein interfaceorg.aya.syntax.GenericAyaFile- Throws:
IOException
-
codeFile
- Specified by:
codeFilein interfaceorg.aya.syntax.GenericAyaFile- Throws:
IOException
-
originalFile
- Specified by:
originalFilein interfaceorg.aya.syntax.GenericAyaFile- Throws:
IOException
-
originalFile
@NotNull public @NotNull org.aya.util.error.SourceFile originalFile(@NotNull @NotNull String sourceCode) -
compiledCorePath
-
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. -
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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. -
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
underlyingFile
Returns the value of theunderlyingFilerecord component.- Returns:
- the value of the
underlyingFilerecord component
-
isLiterate
public boolean isLiterate()Returns the value of theisLiteraterecord component.- Returns:
- the value of the
isLiteraterecord component
-
imports
Returns the value of theimportsrecord component.- Returns:
- the value of the
importsrecord component
-
program
@NotNull public @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt>> program()Returns the value of theprogramrecord component.- Returns:
- the value of the
programrecord component
-
tycked
@NotNull public @NotNull kala.value.MutableValue<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef>> tycked()Returns the value of thetyckedrecord component.- Returns:
- the value of the
tyckedrecord component
-
resolveInfo
@NotNull public @NotNull kala.value.MutableValue<org.aya.resolve.ResolveInfo> resolveInfo()Returns the value of theresolveInforecord component.- Returns:
- the value of the
resolveInforecord component
-
literateData
Returns the value of theliterateDatarecord component.- Returns:
- the value of the
literateDatarecord component
-