ModuleImport

class ModuleImport

Information that a ModuleHeader uses to keep track of a module import, whether from an Extends clause or a Uses clause, as specified by the SpecialMethodAtom.MODULE_HEADER.

Author

Mark van Gulik

Todd L Smith

Parameters

moduleName

The non-resolved name of the module to import.

acceptableVersions

The set of version strings from which to look for a match in the actual imported module's list of compatible versions.

isExtension

true if these imported declarations are supposed to be re-exported from the current module.

names

The set of names (strings) imported from the module. They will be cause atoms to be looked up within the predecessor module, and will be re-exported verbatim if isExtension is true.

renames

The map from new names to old names (both strings) that are imported from the module. The new names will become new atoms in the importing module, and exported if isExtension is true.

excludes

The set of names (strings) to exclude from being imported.

wildcard

Whether to import any published names not explicitly excluded.

Throws

avail.compiler.ImportValidationException

If the specification is invalid.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val acceptableVersions: A_Set

A set of strings which, when intersected with the declared version strings for the actual module being imported, must be nonempty.

Link copied to clipboard
val excludes: A_Set

The set of names to specifically exclude from being imported from the predecessor module.

Link copied to clipboard
val isExtension: Boolean

Whether this ModuleImport is due to an Extends clause rather than a Uses clause, as indicated by module header.

Link copied to clipboard
val moduleName: A_String

The name of the module being imported.

Link copied to clipboard
val names: A_Set

The set of names (strings) explicitly imported through this import declaration. If no names or renames were specified, then this is nil instead.

Link copied to clipboard
val renames: A_Map

The map of renames (string → string) explicitly specified in this import declaration. The keys are the newly introduced names and the values are the names provided by the predecessor module. If no names or renames were specified, then this is nil instead.

Link copied to clipboard
val wildcard: Boolean

Whether to include all names exported by the predecessor module that are not otherwise excluded by this import.