Library class abstract
Abstract base class for organizing standard library functions.
Extend this class to register a reusable namespaced or global library with a
LuaRuntime. LuaLike's built-in string, table, math, and debug
libraries all implement this interface.
A library with a non-empty name is installed as a table and can be loaded lazily through LibraryRegistry. A library with an empty name injects its functions directly into the global environment, which is how the base library is modeled.
Constructors
- Library()
Properties
- description → String
-
A short description of the library for use in generated documentation.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- interpreter ↔ LuaRuntime?
-
The runtime currently initializing this library.
getter/setter pair
- name → String
-
The public Lua name for this library, such as
stringormath.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getAliasDocs(
) → Map< String, AliasDoc> - Returns the alias documentation collected for this library.
-
getDocs(
) → Map< String, FunctionDoc> - Returns the documentation metadata collected for this library's exported values.
-
getEnumDocs(
) → Map< String, EnumDoc> - Returns the enum documentation collected for this library.
-
getMetamethods(
LuaRuntime interpreter) → Map< String, Function> ? - Optional metamethods attached to the exported library table.
-
getTableDocs(
) → Map< String, TableDoc> - Returns the table schema documentation collected for this library.
-
getValueDocs(
) → Map< String, ValueDoc> - Returns the value/constant documentation collected for this library.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerFunctions(
LibraryRegistrationContext context) → void - Register all functions for this library.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited