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
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addExposedClass
(Class<?> clazz) Method for exposing the class.static void
addExposedGlobalObject
(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 void
removeExposedClass
(Class<?> clazz) Method for removing a class from the collection of exposed classes.static void
removeExposedGlobalObject
(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
- TheClass
to expose.
-
addExposedGlobalObject
Method for exposing a global object, which contain methods with annotationLuaMethod
.- Parameters:
globalObject
- The globalObject
to expose.
-
getExposedClasses
Method for getting a collection of exposed classes.- Returns:
- A
Set
of exposed classes.
-
getExposedGlobalObjects
Method for getting a collection of exposed global objects.- Returns:
- A
Set
of exposed global objects.
-
removeExposedClass
Method for removing a class from the collection of exposed classes.- Parameters:
clazz
- TheClass
to delete.
-
removeExposedGlobalObject
Method for removing a global object from the collection of exposed global objects.- Parameters:
globalObject
- The globalObject
to delete.
-