|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scijava.module.AbstractModule
org.scijava.script.ScriptModule
public class ScriptModule
A Module
which executes a script.
Field Summary | |
---|---|
static String |
RETURN_VALUE
|
Constructor Summary | |
---|---|
ScriptModule(ScriptInfo info)
|
Method Summary | |
---|---|
Context |
context()
Gets the application context to which the object belongs. |
Context |
getContext()
Gets the application context to which the object belongs, or null if Contextual.setContext(Context) has not yet been called on this object. |
ScriptEngine |
getEngine()
Gets the script engine used to execute the script. |
ScriptInfo |
getInfo()
Gets metadata about this module. |
ScriptLanguage |
getLanguage()
Gets the scripting language of the script. |
Object |
getReturnValue()
Gets the return value of the script. |
void |
run()
|
void |
setContext(Context context)
Sets the application context to which the object belongs. |
void |
setErrorWriter(Writer error)
Sets the writer used to record the standard error stream. |
void |
setLanguage(ScriptLanguage scriptLanguage)
Overrides the script language to use when executing the script. |
void |
setOutputWriter(Writer output)
Sets the writer used to record the standard output stream. |
Methods inherited from class org.scijava.module.AbstractModule |
---|
cancel, getDelegateObject, getInput, getInputs, getOutput, getOutputs, initialize, isResolved, preview, setInput, setInputs, setOutput, setOutputs, setResolved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RETURN_VALUE
Constructor Detail |
---|
public ScriptModule(ScriptInfo info)
Method Detail |
---|
public ScriptLanguage getLanguage()
public void setLanguage(ScriptLanguage scriptLanguage)
public void setOutputWriter(Writer output)
public void setErrorWriter(Writer error)
public ScriptEngine getEngine()
public Object getReturnValue()
public ScriptInfo getInfo()
Module
getInfo
in interface Module
public void run()
run
in interface Runnable
public Context context()
Contextual
context
in interface Contextual
Contextual.getContext()
public Context getContext()
Contextual
Contextual.setContext(Context)
has not yet been called on this object.
getContext
in interface Contextual
Contextual.context()
public void setContext(Context context)
Contextual
Typically this method simply delegates to Context.inject(Object)
,
and should be called only once to populate the context. Most contextual
objects do not support later alteration of the context, and will throw
IllegalStateException
if this method is invoked again.
setContext
in interface Contextual
Context.inject(Object)
,
for an example of how to implement this interface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |