dan200.computer.api
Interface ILuaObject


public interface ILuaObject

An interface for representing custom objects returned by IPeripheral.callMethod() calls. Return objects implementing this interface to expose objects with methods to lua.


Method Summary
 java.lang.Object[] callMethod(ILuaContext context, int method, java.lang.Object[] arguments)
          Called when a user calls one of the methods that this object implements.
 java.lang.String[] getMethodNames()
          Get the names of the methods that this object implements.
 

Method Detail

getMethodNames

java.lang.String[] getMethodNames()
Get the names of the methods that this object implements. This works the same as IPeripheral.getMethodNames(). See that method for detailed documentation.

See Also:
IPeripheral.getMethodNames()

callMethod

java.lang.Object[] callMethod(ILuaContext context,
                              int method,
                              java.lang.Object[] arguments)
                              throws java.lang.Exception
Called when a user calls one of the methods that this object implements. This works the same as IPeripheral.callMethod(). See that method for detailed documentation.

Throws:
java.lang.Exception
See Also:
IPeripheral.callMethod(IComputerAccess, ILuaContext, int, Object[])