Package com.avrix.lua
Class LuaExposer
java.lang.Object
com.avrix.lua.LuaExposer
A utility class for exposing classes and global objects for use in Lua scripts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddExposedClass(Class<?> clazz) Method for exposing the class.static voidaddExposedGlobalObject(Object globalObject) Method for exposing a global object, which contain methods with annotationLuaMethod.Method for getting a collection of exposed classes.Method for getting a collection of exposed global objects.static voidremoveExposedClass(Class<?> clazz) Method for removing a class from the collection of exposed classes.static voidremoveExposedGlobalObject(Object globalObject) Method for removing a global object from the collection of exposed global objects.
-
Constructor Details
-
LuaExposer
public LuaExposer()
-
-
Method Details
-
addExposedClass
Method for exposing the class.- Parameters:
clazz- TheClassto expose.
-
addExposedGlobalObject
Method for exposing a global object, which contain methods with annotationLuaMethod.- Parameters:
globalObject- The globalObjectto expose.
-
getExposedClasses
Method for getting a collection of exposed classes.- Returns:
- A
Setof exposed classes.
-
getExposedGlobalObjects
Method for getting a collection of exposed global objects.- Returns:
- A
Setof exposed global objects.
-
removeExposedClass
Method for removing a class from the collection of exposed classes.- Parameters:
clazz- TheClassto delete.
-
removeExposedGlobalObject
Method for removing a global object from the collection of exposed global objects.- Parameters:
globalObject- The globalObjectto delete.
-