|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.scijava.module.AbstractModule
public abstract class AbstractModule
Abstract superclass of Module implementations.
By default, input and output values are stored in HashMaps.
| Constructor Summary | |
|---|---|
AbstractModule()
|
|
| Method Summary | |
|---|---|
void |
cancel()
Performs necessary cleanup in response to cancellation of the module execution. |
Object |
getDelegateObject()
Gets the object containing the module's actual implementation. |
Object |
getInput(String name)
Gets the value of the input with the given name. |
Map<String,Object> |
getInputs()
Gets a table of input values. |
Object |
getOutput(String name)
Gets the value of the output with the given name. |
Map<String,Object> |
getOutputs()
Gets a table of output values. |
void |
initialize()
Initializes the module. |
boolean |
isResolved(String name)
Gets the resolution status of the input with the given name. |
void |
preview()
Computes a preview of the module's execution results, if available. |
void |
setInput(String name,
Object value)
Sets the value of the input with the given name. |
void |
setInputs(Map<String,Object> inputs)
Sets input values according to the given table. |
void |
setOutput(String name,
Object value)
Sets the value of the output with the given name. |
void |
setOutputs(Map<String,Object> outputs)
Sets output values according to the given table. |
void |
setResolved(String name,
boolean resolved)
Sets the resolution status of the input with the given name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.scijava.module.Module |
|---|
getInfo |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Constructor Detail |
|---|
public AbstractModule()
| Method Detail |
|---|
public void preview()
ModuleRunnable.run(). Not all modules support
previews.
preview in interface ModuleModuleInfo.canPreview()public void cancel()
ModuleModule.preview() to undo
any changes made as a result of the preview.
cancel in interface ModuleModuleInfo.canCancel()
public void initialize()
throws MethodCallException
Module
First, the module's global initializer method (if any) is called, followed
by each individual ModuleItem initializer method (i.e.,
ModuleItem.initialize(Module)).
initialize in interface ModuleMethodCallExceptionModuleInfo.getInitializer(),
ModuleItem.initialize(Module)public Object getDelegateObject()
ModulegetInfo().getDelegateClassName(). This object must possess all
callback methods specified by ModuleItem.getCallback().
The nature of this method is implementation-specific; e.g., a
CommandModule will return its associated Command. For
modules that are not plugins, the result may be something else. If you are
implementing this interface directly, a good rule of thumb is to return
this.
getDelegateObject in interface Modulepublic Object getInput(String name)
Module
getInput in interface Modulepublic Object getOutput(String name)
Module
getOutput in interface Modulepublic Map<String,Object> getInputs()
Module
getInputs in interface Modulepublic Map<String,Object> getOutputs()
Module
getOutputs in interface Module
public void setInput(String name,
Object value)
Module
setInput in interface Module
public void setOutput(String name,
Object value)
Module
setOutput in interface Modulepublic void setInputs(Map<String,Object> inputs)
Module
setInputs in interface Modulepublic void setOutputs(Map<String,Object> outputs)
Module
setOutputs in interface Modulepublic boolean isResolved(String name)
Module
isResolved in interface Module
public void setResolved(String name,
boolean resolved)
Module
setResolved in interface Module
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||