T - The type of object between which we convert.public abstract class AbstractConvertModule<T> extends AbstractModule implements Module
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConvertModule(AbstractParsers<T> parsers,
AbstractRenderers<T> renderers)
Create an converter module for the given parsers and renderers.
|
| Modifier and Type | Method and Description |
|---|---|
Category[] |
getCategories()
Returns the categories the module belongs to.
|
java.lang.String |
getLongDescription()
Returns a long description of the module.
|
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. |
getShortDescription, getTitleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getShortDescription, getTitleprotected AbstractConvertModule(AbstractParsers<T> parsers, AbstractRenderers<T> renderers)
parsers - The parsers that are supported.renderers - The renderers that are supported.public final java.lang.String getLongDescription()
ModuleAbstractModule returns Module.getShortDescription().getLongDescription in interface ModulegetLongDescription in class AbstractModulepublic final Category[] getCategories()
ModulegetCategories in interface Modulepublic final void require(ModuleInputSpec inputSpec)
ModuleModuleInputSpec.addParameter(String, Class, String, String...) method can
be used. The order of specified parameters matters.public final void provide(ModuleOutputSpec outputSpec)
ModuleModuleOutputSpec.addReturnValue(String, Class, String...) method
can be used. The order of specified return values matters.public final 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.run in interface Moduleinput - storage of the inputsoutput - storage of the outputsModuleException - On various kinds of errors that prevent the module from working.