ModuleContext class abstract
Abstract interface for module loading and context tracking.
This interface decouples the interpreter from the concrete module loading implementation, allowing:
- tom_d4rt_ast to work with pre-parsed AST without analyzer dependency
- tom_d4rt_exec to provide full module loading with parser callback
The interpreter uses this interface to:
- Resolve relative import URIs against the current library
- Load modules when processing import directives
- Check permissions for security-sensitive operations
- Implementers
Constructors
Properties
- currentLibrary ↔ Uri?
-
The current library URI being executed.
getter/setter pair
- globalEnvironment → Environment
-
The global environment shared across all modules.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkPermission(
dynamic operation) → bool - Checks if a permission is granted for the given operation.
-
loadModule(
Uri uri, {Set< String> ? showNames, Set<String> ? hideNames}) → LoadedModule - Loads a module from the given URI.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited