ModuleLoader class abstract

Resolves import paths to modules. Pluggable so alternative strategies (e.g. a filesystem loader) can be supplied without changing the resolver.

The default VMModuleLoader is web-safe: it resolves purely against modules already loaded into an ApolloVM (plus core packages) using string math — it never touches dart:io. A filesystem-backed loader would be a separate, non-core implementation of this interface.

Implementers

Constructors

ModuleLoader()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

loadModule(String moduleId, {String? language}) → LoadedModule?
Loads the module with canonical id moduleId, or null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveCorePackage(String importPath) → CorePackageBase?
Resolves importPath to a built-in core package, or null.
resolveModuleId(String importPath, {String? fromModule, String? language}) → String?
Normalizes importPath (optionally relative to fromModule) to the canonical id of a loadable module, or null if none matches.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited