Package org.scijava.module
Class AbstractModuleInfo
- java.lang.Object
-
- org.scijava.AbstractBasicDetails
-
- org.scijava.AbstractUIDetails
-
- org.scijava.module.AbstractModuleInfo
-
- All Implemented Interfaces:
Comparable<Prioritized>,BasicDetails,Identifiable,Locatable,ModuleInfo,Named,Prioritized,UIDetails,Validated,Versioned
- Direct Known Subclasses:
DefaultMutableModuleInfo,ScriptInfo
public abstract class AbstractModuleInfo extends AbstractUIDetails implements ModuleInfo
Abstract superclass ofModuleInfoimplementation.By default,
ModuleItems are stored inHashMaps andArrayLists, internally.- Author:
- Curtis Rueden
-
-
Field Summary
-
Fields inherited from interface org.scijava.UIDetails
APPLICATION_MENU_ROOT
-
-
Constructor Summary
Constructors Constructor Description AbstractModuleInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearParameters()Clears input and output parameters.ModuleItem<?>getInput(String name)Gets the input item with the given name.<T> ModuleItem<T>getInput(String name, Class<T> type)Gets the input item with the given name and type.ModuleItem<?>getOutput(String name)Gets the output item with the given name.<T> ModuleItem<T>getOutput(String name, Class<T> type)Gets the output item with the given name and type.protected List<ModuleItem<?>>inputList()GetsoutputMap, initializing if needed.protected Map<String,ModuleItem<?>>inputMap()GetsinputMap, initializing if needed.Iterable<ModuleItem<?>>inputs()Gets the list of input items.protected List<ModuleItem<?>>outputList()GetsoutputList, initializing if needed.protected Map<String,ModuleItem<?>>outputMap()GetsinputList, initializing if needed.Iterable<ModuleItem<?>>outputs()Gets the list of output items.protected voidparseParameters()Parses input and output parameters.protected voidregisterInput(ModuleItem<?> input)Adds an input.protected voidregisterOutput(ModuleItem<?> output)Adds an output.-
Methods inherited from class org.scijava.AbstractUIDetails
getIconPath, getMenuPath, getMenuRoot, getPriority, getSelectionGroup, isEnabled, isSelectable, isSelected, isVisible, setEnabled, setIconPath, setMenuPath, setMenuRoot, setPriority, setSelectable, setSelected, setSelectionGroup, setVisible, toString
-
Methods inherited from class org.scijava.AbstractBasicDetails
get, getDescription, getLabel, getName, is, set, setDescription, setLabel, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.scijava.BasicDetails
get, getDescription, getLabel, is, set, setDescription, setLabel
-
Methods inherited from interface org.scijava.module.ModuleInfo
canCancel, canPreview, canRunHeadless, createModule, getDelegateClassName, getIdentifier, getInitializer, getLocation, getProblems, getTitle, getVersion, isInteractive, isValid, loadDelegateClass, update
-
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
-
Methods inherited from interface org.scijava.UIDetails
compareTo, getIconPath, getMenuPath, getMenuRoot, getSelectionGroup, isEnabled, isSelectable, isSelected, isVisible, setEnabled, setIconPath, setMenuPath, setMenuRoot, setSelectable, setSelected, setSelectionGroup, setVisible
-
-
-
-
Method Detail
-
getInput
public ModuleItem<?> getInput(String name)
Description copied from interface:ModuleInfoGets the input item with the given name.- Specified by:
getInputin interfaceModuleInfo
-
getInput
public <T> ModuleItem<T> getInput(String name, Class<T> type)
Description copied from interface:ModuleInfoGets the input item with the given name and type.- Specified by:
getInputin interfaceModuleInfo
-
getOutput
public ModuleItem<?> getOutput(String name)
Description copied from interface:ModuleInfoGets the output item with the given name.- Specified by:
getOutputin interfaceModuleInfo
-
getOutput
public <T> ModuleItem<T> getOutput(String name, Class<T> type)
Description copied from interface:ModuleInfoGets the output item with the given name and type.- Specified by:
getOutputin interfaceModuleInfo
-
inputs
public Iterable<ModuleItem<?>> inputs()
Description copied from interface:ModuleInfoGets the list of input items.- Specified by:
inputsin interfaceModuleInfo
-
outputs
public Iterable<ModuleItem<?>> outputs()
Description copied from interface:ModuleInfoGets the list of output items.- Specified by:
outputsin interfaceModuleInfo
-
parseParameters
protected void parseParameters()
Parses input and output parameters. Intended to be overridden by concrete subclasses.
-
clearParameters
protected void clearParameters()
Clears input and output parameters.
-
registerInput
protected void registerInput(ModuleItem<?> input)
Adds an input. Intended to be called from overriddenparseParameters()methods.
-
registerOutput
protected void registerOutput(ModuleItem<?> output)
Adds an output. Intended to be called from overriddenparseParameters()methods.
-
inputMap
protected Map<String,ModuleItem<?>> inputMap()
GetsinputMap, initializing if needed.
-
outputMap
protected Map<String,ModuleItem<?>> outputMap()
GetsinputList, initializing if needed.
-
inputList
protected List<ModuleItem<?>> inputList()
GetsoutputMap, initializing if needed.
-
outputList
protected List<ModuleItem<?>> outputList()
GetsoutputList, initializing if needed.
-
-