Package org.scijava.module
Interface MutableModuleInfo
-
- All Superinterfaces:
BasicDetails,Comparable<Prioritized>,Identifiable,Locatable,ModuleInfo,Named,Prioritized,UIDetails,Validated,Versioned
- All Known Implementing Classes:
DefaultMutableModuleInfo,DynamicCommandInfo
public interface MutableModuleInfo extends ModuleInfo
ModuleInfoextension allowing manipulation of its metadata.In particular, module inputs and outputs can be added, edited and removed.
Note that a
MutableModuleInfodoes not necessarily haveMutableModuleItems!- Author:
- Curtis Rueden
- See Also:
DynamicCommand
-
-
Field Summary
-
Fields inherited from interface org.scijava.UIDetails
APPLICATION_MENU_ROOT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddInput(ModuleItem<?> input)Adds an input to the list.voidaddOutput(ModuleItem<?> output)Adds an output to the list.default ModulecreateModule()Instantiates the module described by this module info.default StringgetDelegateClassName()Gets the fully qualified name of the class containing the module's actual implementation.Class<? extends Module>getModuleClass()Gets the module class described by thisModuleInfo.default Class<?>loadDelegateClass()Loads the class containing the module's actual implementation.voidremoveInput(ModuleItem<?> input)Removes an input from the list.voidremoveOutput(ModuleItem<?> output)Removes an output from the list.voidsetModuleClass(Class<? extends Module> moduleClass)Sets the module class described by thisModuleInfo.-
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, getIdentifier, getInitializer, getInput, getInput, getLocation, getOutput, getOutput, getProblems, getTitle, getVersion, inputs, isInteractive, isValid, outputs, 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
-
setModuleClass
void setModuleClass(Class<? extends Module> moduleClass)
Sets the module class described by thisModuleInfo.
-
getModuleClass
Class<? extends Module> getModuleClass()
Gets the module class described by thisModuleInfo.
-
addInput
void addInput(ModuleItem<?> input)
Adds an input to the list.
-
addOutput
void addOutput(ModuleItem<?> output)
Adds an output to the list.
-
removeInput
void removeInput(ModuleItem<?> input)
Removes an input from the list.
-
removeOutput
void removeOutput(ModuleItem<?> output)
Removes an output from the list.
-
getDelegateClassName
default String getDelegateClassName()
Description copied from interface:ModuleInfoGets the fully qualified name of the class containing the module's actual implementation. By definition, this is the same value returned bycreateModule().getDelegateObject().getClass().getName(), and hence is also the class containing any callback methods specified byModuleItem.getCallback().The nature of this method is implementation-specific; for example, a
CommandModulewill return the class name of its associatedCommand. For modules that are not commands, the result may be something else.If you are implementing this interface directly, a good rule of thumb is to return the class name of the associated
Module(i.e., the same value given bycreateModule().getClass().getName()).- Specified by:
getDelegateClassNamein interfaceModuleInfo
-
loadDelegateClass
default Class<?> loadDelegateClass()
Description copied from interface:ModuleInfoLoads the class containing the module's actual implementation. The name of the loaded class will match the value returned byModuleInfo.getDelegateClassName().- Specified by:
loadDelegateClassin interfaceModuleInfo- See Also:
Instantiable.loadClass()
-
createModule
default Module createModule() throws ModuleException
Description copied from interface:ModuleInfoInstantiates the module described by this module info.- Specified by:
createModulein interfaceModuleInfo- Throws:
ModuleException
-
-