Module Roots
ModuleRoots encapsulates the Avail module path. The Avail module path specifies bindings between logical root names and locations of Avail modules. A logical root name should typically belong to a vendor of Avail modules, ergo a domain name or registered trademark suffices nicely.
The format of an Avail module path is described by the following simple grammar:
modulePath ::= binding ++ ";" ;
binding ::= logicalRoot "=" objectRepository ("," sourceDirectory) ;
logicalRoot ::= [^=;]+ ;
objectRepository ::= [^;]+ ;
sourceDirectory ::= [^;]+ ;logicalRoot represents a logical root name. objectRepository represents the absolute path of a binary module repository. sourceDirectory represents the absolute path of a package, i.e., a directory containing source modules, and may be sometimes be omitted (e.g., when compilation is not required).
Author
Todd L Smith
Richard Arriaga
Parameters
The associated FileManager.
An Avail module path.
A lambda that accepts List of the string ModuleRoots that failed to resolve.
Throws
If the Avail module path is malformed.
Constructors
Construct a new ModuleRoots from the specified Avail roots path.
Functions
Clear the root map.
Answer the module root bound to the specified logical root name.
Retrieve all of the root ResolverReferences for each ModuleRoot in this ModuleRoots and pass them to the provided function.
Fully remove the provided ModuleRoot.name.
Write a JSON object whose fields are the module roots and whose values are JSON arrays containing path information.
Properties
The module roots in the order that they are specified in the Avail module path.