Package com.avrix.lua

Class LuaExposer

java.lang.Object
com.avrix.lua.LuaExposer

public class LuaExposer extends Object
A utility class for exposing classes and global objects for use in Lua scripts.
  • Constructor Details

    • LuaExposer

      public LuaExposer()
  • Method Details

    • addExposedClass

      public static void addExposedClass(Class<?> clazz)
      Method for exposing the class.
      Parameters:
      clazz - The Class to expose.
    • addExposedGlobalObject

      public static void addExposedGlobalObject(Object globalObject)
      Method for exposing a global object, which contain methods with annotation LuaMethod.
      Parameters:
      globalObject - The global Object to expose.
    • getExposedClasses

      public static Set<Class<?>> getExposedClasses()
      Method for getting a collection of exposed classes.
      Returns:
      A Set of exposed classes.
    • getExposedGlobalObjects

      public static Set<Object> getExposedGlobalObjects()
      Method for getting a collection of exposed global objects.
      Returns:
      A Set of exposed global objects.
    • removeExposedClass

      public static void removeExposedClass(Class<?> clazz)
      Method for removing a class from the collection of exposed classes.
      Parameters:
      clazz - The Class to delete.
    • removeExposedGlobalObject

      public static void removeExposedGlobalObject(Object globalObject)
      Method for removing a global object from the collection of exposed global objects.
      Parameters:
      globalObject - The global Object to delete.