LibraryRegistry class

Registry for all standard and user-defined libraries in a runtime.

A LuaRuntime owns a single registry. Register a Library instance and then call initializeLibrary, initializeLibraryByName, or initializeAll to expose it to scripts.

Constructors

LibraryRegistry(LuaRuntime _interpreter)

Properties

globalLibraries List<Library>
Registered libraries that populate the global environment, in order.
no setter
hashCode int
The hash code for this object.
no setterinherited
libraries List<Library>
The libraries registered with this runtime in registration order.
no setter
namespacedLibraries List<Library>
Registered libraries exposed under a namespace, in order.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

findByName(String name) Library?
Returns the registered library named name, if present.
initializeAll() → void
Initializes every registered library.
initializeLibrary(Library library) Value?
Initialize the provided library instance if it hasn't been already.
initializeLibraryByName(String name) Value?
Initialize a specific library by name (if registered).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(Library library) → void
Registers library with this runtime.
toString() String
A string representation of this object.
inherited

Operators

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