java.lang.Object
org.aya.resolve.context.PhysicalModuleContext
- All Implemented Interfaces:
Context,ModuleContext,Problematic
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.resolve.context.Context
Context.ResolvingInterruptedException -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @NotNull ModuleExportfinal @NotNull kala.collection.mutable.MutableMap<org.aya.syntax.concrete.stmt.ModuleName.Qualified, ModuleExport> final @NotNull Contextfinal @NotNull ModuleSymbol<org.aya.syntax.ref.AnyVar> -
Constructor Summary
ConstructorsConstructorDescriptionPhysicalModuleContext(@NotNull Context parent, @NotNull org.aya.syntax.ref.ModulePath modulePath) -
Method Summary
Modifier and TypeMethodDescription@NotNull NoExportContext@NotNull ModuleExportexports()Things (symbol or module) that are exported by this module.booleanexportSymbol(@NotNull org.aya.syntax.concrete.stmt.ModuleName modName, @NotNull String name, @NotNull org.aya.syntax.ref.AnyDefVar ref) Exporting anAnyVarwith qualified id{modName}::{name}voidimportModule(org.aya.syntax.concrete.stmt.ModuleName.Qualified modName, @NotNull ModuleExport modExport, org.aya.syntax.concrete.stmt.Stmt.Accessibility accessibility, @NotNull org.aya.util.error.SourcePos sourcePos) Importing one module export.@NotNull org.aya.syntax.ref.ModulePathThe path of this module@NotNull kala.collection.mutable.MutableMap<org.aya.syntax.concrete.stmt.ModuleName.Qualified, ModuleExport> modules()All imported modules in this context.
Qualified Module -> Module Export@NotNull Contextparent()@NotNull ModuleSymbol<org.aya.syntax.ref.AnyVar> symbols()All available symbols in this contextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aya.resolve.context.Context
bind, bind, bind, collect, derive, derive, get, getMaybe, getModuleMaybe, getQualified, getQualifiedMaybe, getUnqualified, getUnqualifiedMaybe, iterate, reportAll, reportAllAndThrow, reportAndThrowMethods inherited from interface org.aya.resolve.context.ModuleContext
defineSymbol, getModuleLocalMaybe, getQualifiedLocalMaybe, getUnqualifiedLocalMaybe, importModule, importSymbol, openModule, openModule, reporter, underlyingFileMethods inherited from interface org.aya.tyck.tycker.Problematic
fail, fail, fail
-
Field Details
-
parent
-
exports
-
symbols
-
modules
@NotNull public final @NotNull kala.collection.mutable.MutableMap<org.aya.syntax.concrete.stmt.ModuleName.Qualified,ModuleExport> modules
-
-
Constructor Details
-
PhysicalModuleContext
public PhysicalModuleContext(@NotNull @NotNull Context parent, @NotNull @NotNull org.aya.syntax.ref.ModulePath modulePath)
-
-
Method Details
-
modulePath
@NotNull public @NotNull org.aya.syntax.ref.ModulePath modulePath()Description copied from interface:ContextThe path of this module- Specified by:
modulePathin interfaceContext
-
importModule
public void importModule(@NotNull org.aya.syntax.concrete.stmt.ModuleName.Qualified modName, @NotNull @NotNull ModuleExport modExport, @NotNull org.aya.syntax.concrete.stmt.Stmt.Accessibility accessibility, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) Description copied from interface:ModuleContextImporting one module export.- Specified by:
importModulein interfaceModuleContext- Parameters:
modName- the name of the modulemodExport- the moduleaccessibility- of importing, re-export if public
-
exportSymbol
public boolean exportSymbol(@NotNull @NotNull org.aya.syntax.concrete.stmt.ModuleName modName, @NotNull @NotNull String name, @NotNull @NotNull org.aya.syntax.ref.AnyDefVar ref) Description copied from interface:ModuleContextExporting anAnyVarwith qualified id{modName}::{name}- Specified by:
exportSymbolin interfaceModuleContext- Returns:
- true if exported successfully, otherwise (when there already exist a symbol with the same name) false.
-
exampleContext
-
parent
- Specified by:
parentin interfaceContext- Specified by:
parentin interfaceModuleContext
-
symbols
Description copied from interface:ModuleContextAll available symbols in this context- Specified by:
symbolsin interfaceModuleContext
-
modules
@NotNull public @NotNull kala.collection.mutable.MutableMap<org.aya.syntax.concrete.stmt.ModuleName.Qualified,ModuleExport> modules()Description copied from interface:ModuleContextAll imported modules in this context.
Qualified Module -> Module Export- Specified by:
modulesin interfaceModuleContext
-
exports
Description copied from interface:ModuleContextThings (symbol or module) that are exported by this module.- Specified by:
exportsin interfaceModuleContext
-