Package autumn.lang
Interface Module
- All Known Implementing Classes:
AbstractModule
public interface Module
This is a supertype of all modules.
Each module should provide an instance() method that returns a singleton instance of the module.
- Author:
- Mackenzie High
-
Method Summary
Modifier and TypeMethodDescriptioninfo()
This method retrieves the object that describes this module.void
invoke
(int index, ArgumentStack arguments) This method invokes a function within this module.
-
Method Details
-
info
ModuleInfo info()This method retrieves the object that describes this module.This is a constant-time operation.
- Returns:
- the singleton object that stores information regarding this module.
-
invoke
This method invokes a function within this module.This is a low-level function needed to implement delegates.
The key is the index of the function in the list returned by moduleFunctions().
This method does nothing, iff the index does not refer to a real function.
- Parameters:
index
- identifies the function to invoke.arguments
- contains the arguments to pass to the function.- Throws:
Throwable
- Any unhandled exception thrown by the function will be rethrown.
-