li.cil.oc.api.network
public interface ManagedPeripheral
Environment
and is intended to be used for environments wrapping a ComputerCraft
peripheral. Tt could be used for other purposes as well, though. It allows
providing method names in addition to those defined via the
Callback annotation, and invoking said methods.| Modifier and Type | Method and Description |
|---|---|
java.lang.Object[] |
invoke(java.lang.String method,
Context context,
Arguments args)
Calls a method from the list provided by
methods(). |
java.lang.String[] |
methods()
Get the list of methods provided by this environment, in
addition to methods marked as callbacks.
|
java.lang.String[] methods()
java.lang.Object[] invoke(java.lang.String method,
Context context,
Arguments args)
throws java.lang.Exception
methods().
method - the name of the method to call.context - the context from which the method is called.args - the arguments to pass to the method.java.lang.NoSuchMethodException - if there is no method with the
specified name.java.lang.Exception