Module aya.cli.impl

Class ReplContext

java.lang.Object
org.aya.resolve.context.PhysicalModuleContext
org.aya.cli.interactive.ReplContext
All Implemented Interfaces:
RepoLike<ReplContext>, org.aya.resolve.context.Context, org.aya.resolve.context.ModuleContext

public final class ReplContext extends org.aya.resolve.context.PhysicalModuleContext implements RepoLike<ReplContext>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.aya.resolve.context.Context

    org.aya.resolve.context.Context.ResolvingInterruptedException
  • Field Summary

    Fields inherited from class org.aya.resolve.context.PhysicalModuleContext

    exports, modules, parent, symbols
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReplContext(@NotNull org.aya.resolve.context.Context parent, @NotNull org.aya.resolve.context.ModulePath name)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    @NotNull ReplContext
    derive(@NotNull String extraName)
     
    @NotNull ReplContext
    derive(@NotNull kala.collection.immutable.ImmutableSeq<@NotNull String> extraName)
     
    boolean
    exportSymbol(@NotNull org.aya.resolve.context.ModuleName modName, @NotNull String name, @NotNull org.aya.ref.DefVar<?,?> ref)
     
    @NotNull ReplContext
     
    void
    importModule(org.aya.resolve.context.ModuleName.Qualified modName, @NotNull org.aya.resolve.context.ModuleExport mod, @NotNull org.aya.concrete.stmt.Stmt.Accessibility accessibility, @NotNull org.aya.util.error.SourcePos sourcePos)
     
    void
    importSymbol(boolean imported, @NotNull org.aya.ref.AnyVar ref, @NotNull org.aya.resolve.context.ModuleName modName, @NotNull String name, @NotNull org.aya.concrete.stmt.Stmt.Accessibility acc, @NotNull org.aya.util.error.SourcePos sourcePos)
     
    void
     
    void
    setDownstream(@Nullable ReplContext downstream)
     

    Methods inherited from class org.aya.resolve.context.PhysicalModuleContext

    exampleContext, exports, modulePath, modules, parent, symbols

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.aya.resolve.context.Context

    bind, bind, bind, collect, get, getMaybe, getModuleMaybe, getQualified, getQualifiedMaybe, getUnqualified, getUnqualifiedMaybe, iterate, reportAll, reportAllAndThrow, reportAndThrow

    Methods inherited from interface org.aya.resolve.context.ModuleContext

    defineSymbol, getModuleLocalMaybe, getQualifiedLocalMaybe, getUnqualifiedLocalMaybe, importModule, openModule, openModule, reporter, underlyingFile

    Methods inherited from interface org.aya.cli.utils.RepoLike

    fork
  • Constructor Details

    • ReplContext

      public ReplContext(@NotNull @NotNull org.aya.resolve.context.Context parent, @NotNull @NotNull org.aya.resolve.context.ModulePath name)
  • Method Details

    • importSymbol

      public void importSymbol(boolean imported, @NotNull @NotNull org.aya.ref.AnyVar ref, @NotNull @NotNull org.aya.resolve.context.ModuleName modName, @NotNull @NotNull String name, @NotNull org.aya.concrete.stmt.Stmt.Accessibility acc, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos)
      Specified by:
      importSymbol in interface org.aya.resolve.context.ModuleContext
    • exportSymbol

      public boolean exportSymbol(@NotNull @NotNull org.aya.resolve.context.ModuleName modName, @NotNull @NotNull String name, @NotNull @NotNull org.aya.ref.DefVar<?,?> ref)
      Specified by:
      exportSymbol in interface org.aya.resolve.context.ModuleContext
      Overrides:
      exportSymbol in class org.aya.resolve.context.PhysicalModuleContext
    • importModule

      public void importModule(@NotNull org.aya.resolve.context.ModuleName.Qualified modName, @NotNull @NotNull org.aya.resolve.context.ModuleExport mod, @NotNull org.aya.concrete.stmt.Stmt.Accessibility accessibility, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos)
      Specified by:
      importModule in interface org.aya.resolve.context.ModuleContext
      Overrides:
      importModule in class org.aya.resolve.context.PhysicalModuleContext
    • derive

      @NotNull public @NotNull ReplContext derive(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<@NotNull String> extraName)
      Specified by:
      derive in interface org.aya.resolve.context.Context
    • derive

      @NotNull public @NotNull ReplContext derive(@NotNull @NotNull String extraName)
      Specified by:
      derive in interface org.aya.resolve.context.Context
    • setDownstream

      public void setDownstream(@Nullable @Nullable ReplContext downstream)
      Specified by:
      setDownstream in interface RepoLike<ReplContext>
    • fork

      @NotNull public @NotNull ReplContext fork()
    • merge

      public void merge()
      Specified by:
      merge in interface RepoLike<ReplContext>
    • clear

      @Contract(mutates="this") public void clear()