java.lang.Object
org.aya.cli.library.incremental.DelegateCompilerAdvisor
- All Implemented Interfaces:
AutoCloseable,CompilerAdvisor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearLibraryOutput(@NotNull LibraryOwner owner) voidclearModuleOutput(@NotNull LibrarySource source) voidclose()@NotNull org.aya.syntax.GenericAyaParsercreateParser(@NotNull org.aya.util.reporter.Reporter reporter) Used for injecting parser from IJ plugin to support on-the-fly analysis.@Nullable org.aya.resolve.ResolveInfodoLoadCompiledCore(@NotNull org.aya.util.reporter.Reporter reporter, @NotNull LibraryOwner owner, @NotNull org.aya.syntax.ref.ModulePath mod, @Nullable Path sourcePath, @Nullable Path corePath, @NotNull org.aya.resolve.module.ModuleLoader recurseLoader) Try to load the compiled core.@NotNull org.aya.resolve.ResolveInfodoSaveCompiledCore(@NotNull LibrarySource file, @NotNull org.aya.resolve.ResolveInfo resolveInfo, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef> defs, @NotNull org.aya.resolve.module.ModuleLoader recurseLoader) Save the well-typed defs as compiled defsbooleanisSourceModified(@NotNull LibrarySource source) voidnotifyIncrementalJob(@NotNull kala.collection.immutable.ImmutableSeq<LibrarySource> modified, @NotNull kala.collection.immutable.ImmutableSeq<kala.collection.immutable.ImmutableSeq<LibrarySource>> affected) Called when all modified sources are detectedvoidprepareLibraryOutput(@NotNull LibraryOwner owner) voidupdateLastModified(@NotNull LibrarySource source) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aya.cli.library.incremental.CompilerAdvisor
loadCompiledCore, saveCompiledCore
-
Field Details
-
delegate
-
-
Constructor Details
-
DelegateCompilerAdvisor
-
-
Method Details
-
notifyIncrementalJob
public void notifyIncrementalJob(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<LibrarySource> modified, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<kala.collection.immutable.ImmutableSeq<LibrarySource>> affected) Description copied from interface:CompilerAdvisorCalled when all modified sources are detected- Specified by:
notifyIncrementalJobin interfaceCompilerAdvisor- Parameters:
modified- User directly modified source files.affected- SCC of modified sources.
-
isSourceModified
- Specified by:
isSourceModifiedin interfaceCompilerAdvisor
-
updateLastModified
- Specified by:
updateLastModifiedin interfaceCompilerAdvisor
-
prepareLibraryOutput
- Specified by:
prepareLibraryOutputin interfaceCompilerAdvisor- Throws:
IOException
-
clearLibraryOutput
- Specified by:
clearLibraryOutputin interfaceCompilerAdvisor- Throws:
IOException
-
clearModuleOutput
- Specified by:
clearModuleOutputin interfaceCompilerAdvisor- Throws:
IOException
-
createParser
@NotNull public @NotNull org.aya.syntax.GenericAyaParser createParser(@NotNull @NotNull org.aya.util.reporter.Reporter reporter) Description copied from interface:CompilerAdvisorUsed for injecting parser from IJ plugin to support on-the-fly analysis.- Specified by:
createParserin interfaceCompilerAdvisor
-
doLoadCompiledCore
@Nullable public @Nullable org.aya.resolve.ResolveInfo doLoadCompiledCore(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull LibraryOwner owner, @NotNull @NotNull org.aya.syntax.ref.ModulePath mod, @Nullable @Nullable Path sourcePath, @Nullable @Nullable Path corePath, @NotNull @NotNull org.aya.resolve.module.ModuleLoader recurseLoader) throws IOException, ClassNotFoundException Description copied from interface:CompilerAdvisorTry to load the compiled core. ForDiskCompilerAdvisor, returns null if the core path does not exist or either source or core path is null. ForInMemoryCompilerAdvisor, returns null if the mod does not store in memory.- Specified by:
doLoadCompiledCorein interfaceCompilerAdvisor- Throws:
IOExceptionClassNotFoundException
-
doSaveCompiledCore
@NotNull public @NotNull org.aya.resolve.ResolveInfo doSaveCompiledCore(@NotNull @NotNull LibrarySource file, @NotNull @NotNull org.aya.resolve.ResolveInfo resolveInfo, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef> defs, @NotNull @NotNull org.aya.resolve.module.ModuleLoader recurseLoader) throws IOException, ClassNotFoundException Description copied from interface:CompilerAdvisorSave the well-typed defs as compiled defs- Specified by:
doSaveCompiledCorein interfaceCompilerAdvisor- Parameters:
file- the source fileresolveInfo- the resolve info of the moduledefs- the well-typed definitions- Throws:
IOExceptionClassNotFoundException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCompilerAdvisor- Throws:
Exception
-