public interface CodeRunner extends HandlerPlugin<Object>
RunService
's execution handling. A
CodeRunner
knows how to execute code of a certain form, such as the
main
method of a Java Class
, or an Identifiable
SciJava module.
Code runner plugins discoverable at runtime must implement this interface
and be annotated with @Plugin
with attribute Plugin.type()
=
CodeRunner
.class. While it possible to create a class runner plugin
merely by implementing this interface, it is encouraged to instead extend
AbstractCodeRunner
, for convenience.
Modifier and Type | Method and Description |
---|---|
void |
run(Object code,
Map<String,Object> inputMap)
Executes the code identified by the given object, passing the arguments in
the specified map as inputs.
|
void |
run(Object code,
Object... args)
Executes the code identified by the given object, passing the
specified arguments as inputs.
|
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
void run(Object code, Object... args) throws InvocationTargetException
InvocationTargetException
void run(Object code, Map<String,Object> inputMap) throws InvocationTargetException
InvocationTargetException
Copyright © 2009–2016 SciJava. All rights reserved.