Package 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 implementService.Services are obtained from this preprocessor instance's application context.
Many modules (e.g., most
Commands) use @Parameter-annotated service fields, resulting in those parameters being populated when the SciJava application context is injected (viaContext.inject(Object)). However, some modules may have service parameters which are programmatically generated (i.e., returned directly as inputs fromModuleInfo.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 @Parameterannotation. In such cases, we need this service preprocessor to fill in the service values.- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description ServicePreprocessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocess(Module module)Performs a processing step on the given module instance.-
Methods inherited from class org.scijava.module.process.AbstractPreprocessorPlugin
cancel, getCancelReason, isCanceled
-
Methods inherited from class org.scijava.AbstractContextual
context, getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
-
-
-
Method Detail
-
process
public void process(Module module)
Description copied from interface:ModuleProcessorPerforms a processing step on the given module instance.
-
-