org.scijava.module.process
Class ServicePreprocessor
java.lang.Object
org.scijava.AbstractContextual
org.scijava.module.process.AbstractPreprocessorPlugin
org.scijava.module.process.ServicePreprocessor
- All Implemented Interfaces:
- Cancelable, Contextual, ModulePreprocessor, ModuleProcessor, PreprocessorPlugin, SciJavaPlugin
public class ServicePreprocessor
- extends AbstractPreprocessorPlugin
The service preprocessor automatically populates module inputs that implement
Service
.
Services are obtained from this preprocessor instance's application context.
Many modules (e.g., most Command
s) use @Parameter
-annotated
service fields, resulting in those parameters being populated when the
SciJava application context is injected (via Context.inject(Object)
.
However, some modules may have service parameters which are programmatically
generated (i.e., returned directly as inputs from ModuleInfo.inputs()
and as such not populated by context injection. E.g., this situation is the
case for scripts, since module inputs are parsed from the script header
rather than declared via the @Parameter
annotation. In such cases, we
need this service preprocessor to fill in the service values.
- Author:
- Curtis Rueden
Method Summary |
void |
process(Module module)
Performs a processing step on the given module instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServicePreprocessor
public ServicePreprocessor()
process
public void process(Module module)
- Description copied from interface:
ModuleProcessor
- Performs a processing step on the given module instance.
Copyright © 2009–2014 SciJava. All rights reserved.