Package com.hk.lua

Class LuaLibraries

java.lang.Object
com.hk.lua.LuaLibraries

public final class LuaLibraries
extends Object

This class contains all the different packages that have been implemented into a Lua library. They also have their own respective tables, if needs be, a new LuaLibrary object can be created to replace the imported table name.

This class doesn't import LuaLibraryG2D or LuaLibrarySwing in the off chance that they don't have the proper classes/resources to initialize. Also not every environment that would be imported into would contain those "requirements"

  • Field Summary

    Fields 
    Modifier and Type Field Description
    static com.hk.lua.LuaLibrary<LuaLibraryFileSystem> FILESYSTEM
    Constant FILESYSTEM
    static com.hk.lua.LuaLibrary<LuaLibraryG2D> G2D
    Constant G2D
    static com.hk.lua.LuaLibrary<LuaLibraryHTTP> HTTP
    Constant HTTP
    static com.hk.lua.LuaLibrary<LuaLibrarySocket> SOCKET
    Constant SOCKET
    static com.hk.lua.LuaLibrary<LuaLibrarySwing> SWING
    Constant SWING
    static com.hk.lua.LuaLibrary<LuaLibraryUUID> UUID
    Constant UUID
  • Method Summary

    Modifier and Type Method Description
    static void importAll​(@NotNull com.hk.lua.LuaFactory factory)
    Import the standard Lua 5.3 libraries, that come with hklib, as well as the additional libraries within this package.
    static void importAll​(@NotNull com.hk.lua.LuaInterpreter interp)
    Import the standard Lua 5.3 libraries, that come with hklib, as well as the additional libraries within this package.
    static void importOnlyExtra​(@NotNull com.hk.lua.LuaFactory factory)
    Import only the extra libraries within this package.
    static void importOnlyExtra​(@NotNull com.hk.lua.LuaInterpreter interp)
    Import only the extra libraries within this package.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • importAll

      public static void importAll​(@NotNull @NotNull com.hk.lua.LuaInterpreter interp)

      Import the standard Lua 5.3 libraries, that come with hklib, as well as the additional libraries within this package.

      Additional Libraries are:

      Parameters:
      interp - The environment to import the libraries into
      See Also:
      Lua.importStandard(LuaInterpreter)
    • importOnlyExtra

      public static void importOnlyExtra​(@NotNull @NotNull com.hk.lua.LuaInterpreter interp)

      Import only the extra libraries within this package.

      Additional Libraries are:

      Parameters:
      interp - The environment to import the libraries into
    • importAll

      public static void importAll​(@NotNull @NotNull com.hk.lua.LuaFactory factory)

      Import the standard Lua 5.3 libraries, that come with hklib, as well as the additional libraries within this package.

      Once these are imported into the factory, they don't need to be imported into the retrieved interpreter object.

      Additional Libraries are:

      Parameters:
      factory - The environment to import the libraries into
      See Also:
      Lua.importStandard(LuaFactory)
    • importOnlyExtra

      public static void importOnlyExtra​(@NotNull @NotNull com.hk.lua.LuaFactory factory)

      Import only the extra libraries within this package.

      Additional Libraries are:

      Parameters:
      factory - The environment to import the libraries into