public abstract class AbstractGeneratorModule extends AbstractModule
| Constructor and Description |
|---|
AbstractGeneratorModule() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract NetGenerator |
createGenerator()
Create an instance of the
NetGenerator that this module should use. |
Category[] |
getCategories()
Returns the categories the module belongs to.
|
void |
provide(ModuleOutputSpec outputSpec)
Specify the return values of the module.
|
void |
require(ModuleInputSpec inputSpec)
Specify the parameters of the module.
|
void |
run(ModuleInput input,
ModuleOutput output)
Perform some computation on the values stored in the
ModuleInput
object and store the results in the ModuleOutput object. |
getLongDescription, getShortDescription, getTitleprotected abstract NetGenerator createGenerator()
NetGenerator that this module should use.public void require(ModuleInputSpec inputSpec)
ModuleModuleInputSpec.addParameter(String, Class, String, String...) method can
be used. The order of specified parameters matters.inputSpec - specification of parameters (input values)public void provide(ModuleOutputSpec outputSpec)
ModuleModuleOutputSpec.addReturnValue(String, Class, String...) method
can be used. The order of specified return values matters.outputSpec - specification of return values (output values)public void run(ModuleInput input, ModuleOutput output) throws ModuleException
ModuleModuleInput
object and store the results in the ModuleOutput object.
To retrieve values from ModuleInput object the
ModuleInput.getParameter(String, Class) method can be used.
To store values in the ModuleOutput object the
ModuleOutput.setReturnValue(String, Class, Object) method can be
used.
The possible values in both the ModuleInput and
ModuleOutput object are determined entirely by the specifications
in the Module.require(ModuleInputSpec) and
Module.provide(ModuleOutputSpec) method respectively.input - storage of the inputsoutput - storage of the outputsModuleException - On various kinds of errors that prevent the module from working.public Category[] getCategories()
Module