org.scijava.module.process
Class AbstractSingleInputPreprocessor

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.module.process.AbstractPreprocessorPlugin
          extended by org.scijava.module.process.AbstractSingleInputPreprocessor
All Implemented Interfaces:
Cancelable, Contextual, ModulePreprocessor, ModuleProcessor, PreprocessorPlugin, SciJavaPlugin

public abstract class AbstractSingleInputPreprocessor
extends AbstractPreprocessorPlugin

Abstract superclass for PreprocessorPlugin implementations that populate singleton inputs. Contains helper methods to facilitate this functionality.

Author:
Mark Hiner

Constructor Summary
AbstractSingleInputPreprocessor()
           
 
Method Summary
protected  String getSingleInput(Module module, Class<?> type)
          Helper method to look up the name of singleton module inputs of a given type.
 
Methods inherited from class org.scijava.module.process.AbstractPreprocessorPlugin
cancel, getCancelReason, isCanceled
 
Methods inherited from class org.scijava.AbstractContextual
context, getContext, setContext
 
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
 
Methods inherited from interface org.scijava.module.process.ModuleProcessor
process
 

Constructor Detail

AbstractSingleInputPreprocessor

public AbstractSingleInputPreprocessor()
Method Detail

getSingleInput

protected String getSingleInput(Module module,
                                Class<?> type)
Helper method to look up the name of singleton module inputs of a given type.

Parameters:
module - Module to check for single input
type - Type of single input to look for
Returns:
If the given module has exactly one input of the specified type, return that input's name. Otherwise null;


Copyright © 2009–2015 SciJava. All rights reserved.