- All Known Subinterfaces:
ModuleContext
- All Known Implementing Classes:
BindContext,EmptyContext,NoExportContext,PhysicalModuleContext
public interface Context
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull Contextbind(@NotNull String name, @NotNull LocalVar ref, @NotNull org.aya.util.error.SourcePos sourcePos, @NotNull Predicate<@Nullable AnyVar> toWarn) default @NotNull Contextdefault @NotNull Contextbind(@NotNull LocalVar ref, @NotNull org.aya.util.error.SourcePos sourcePos, @NotNull Predicate<@Nullable AnyVar> toWarn) default kala.collection.mutable.MutableList<LocalVar>default @NotNull PhysicalModuleContextdefault @NotNull PhysicalModuleContextdefault @NotNull AnyVarget(@NotNull QualifiedID name) Getting a symbol by name .default @Nullable AnyVargetMaybe(@NotNull QualifiedID name) @Nullable ModuleExportgetModuleLocalMaybe(ModuleName.Qualified modName) Trying to get aModuleExportby a module inthiscontext.default @Nullable ModuleExportgetModuleMaybe(ModuleName.Qualified modName) Trying to get aModuleExportby a module in the whole context.default @NotNull AnyVargetQualified(ModuleName.Qualified modName, @NotNull String name, @NotNull org.aya.util.error.SourcePos sourcePos) @Nullable AnyVargetQualifiedLocalMaybe(ModuleName.Qualified modName, @NotNull String name, @NotNull org.aya.util.error.SourcePos sourcePos) Trying to get a symbol by qualified id{modName}::{name}inthiscontextdefault @Nullable AnyVargetQualifiedMaybe(ModuleName.Qualified modName, @NotNull String name, @NotNull org.aya.util.error.SourcePos sourcePos) Trying to get a symbol by qualified id{modName}::{name}in the whole context with .default @NotNull AnyVargetUnqualified(@NotNull String name, @NotNull org.aya.util.error.SourcePos sourcePos) @Nullable AnyVargetUnqualifiedLocalMaybe(@NotNull String name, @NotNull org.aya.util.error.SourcePos sourcePos) Trying to get a symbol by unqualified name inthiscontext.default @Nullable AnyVargetUnqualifiedMaybe(@NotNull String name, @NotNull org.aya.util.error.SourcePos sourcePos) Trying to get a symbol which can referred by unqualified name in the whole context.default <T> Tdefault @NotNull ModulePathThe path of this module@Nullable Contextparent()default voidreportAll(@NotNull kala.collection.SeqLike<org.aya.util.reporter.Problem> problems) default <T> TreportAllAndThrow(@NotNull kala.collection.SeqLike<org.aya.util.reporter.Problem> problems) default <T> TreportAndThrow(@NotNull org.aya.util.reporter.Problem problem) @NotNull org.aya.util.reporter.Reporterreporter()@NotNull Path
-
Method Details
-
parent
-
reporter
@NotNull @NotNull org.aya.util.reporter.Reporter reporter() -
underlyingFile
-
iterate
-
modulePath
The path of this module -
reportAndThrow
@Contract("_ -> fail") @NotNull default <T> T reportAndThrow(@NotNull @NotNull org.aya.util.reporter.Problem problem) -
reportAllAndThrow
@Contract("_ -> fail") @NotNull default <T> T reportAllAndThrow(@NotNull @NotNull kala.collection.SeqLike<org.aya.util.reporter.Problem> problems) -
reportAll
default void reportAll(@NotNull @NotNull kala.collection.SeqLike<org.aya.util.reporter.Problem> problems) -
get
Getting a symbol by name .- Parameters:
name- an id which probably unqualified
-
getMaybe
- See Also:
-
collect
-
getUnqualifiedLocalMaybe
@Nullable @Nullable AnyVar getUnqualifiedLocalMaybe(@NotNull @NotNull String name, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) Trying to get a symbol by unqualified name inthiscontext. -
getUnqualifiedMaybe
@Nullable default @Nullable AnyVar getUnqualifiedMaybe(@NotNull @NotNull String name, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) Trying to get a symbol which can referred by unqualified name in the whole context.- Parameters:
name- the unqualified namesourcePos- the source pos for error reporting- Returns:
- null if not found
- See Also:
-
getUnqualified
@NotNull default @NotNull AnyVar getUnqualified(@NotNull @NotNull String name, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) - See Also:
-
getQualifiedLocalMaybe
@Nullable @Nullable AnyVar getQualifiedLocalMaybe(@NotNull ModuleName.Qualified modName, @NotNull @NotNull String name, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) Trying to get a symbol by qualified id{modName}::{name}inthiscontext- Returns:
- a symbol in component , even it is
ModuleName.This; null if not found
-
getQualifiedMaybe
@Nullable default @Nullable AnyVar getQualifiedMaybe(@NotNull ModuleName.Qualified modName, @NotNull @NotNull String name, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) Trying to get a symbol by qualified id{modName}::{name}in the whole context with . -
getQualified
@NotNull default @NotNull AnyVar getQualified(@NotNull ModuleName.Qualified modName, @NotNull @NotNull String name, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) -
getModuleLocalMaybe
Trying to get aModuleExportby a module inthiscontext.- Parameters:
modName- qualified module name- Returns:
- a ModuleExport of that module; null if no such module.
-
getModuleMaybe
Trying to get aModuleExportby a module in the whole context.- Parameters:
modName- qualified module name- Returns:
- a ModuleExport of that module; null if no such module.
-
bind
-
bind
-
bind
-
derive
-
derive
@NotNull default @NotNull PhysicalModuleContext derive(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<@NotNull String> extraName)
-