public interface MutableModuleInfo extends ModuleInfo
ModuleInfo
extension allowing manipulation of its metadata.
In particular, module inputs and outputs can be added, edited and removed.
Note that a MutableModuleInfo
does not necessarily have
MutableModuleItem
s!
DynamicCommand
APPLICATION_MENU_ROOT
Modifier and Type | Method and Description |
---|---|
void |
addInput(ModuleItem<?> input)
Adds an input to the list.
|
void |
addOutput(ModuleItem<?> output)
Adds an output to the list.
|
default Module |
createModule()
Instantiates the module described by this module info.
|
default String |
getDelegateClassName()
Gets the fully qualified name of the class containing the module's actual
implementation.
|
Class<? extends Module> |
getModuleClass()
Gets the module class described by this
ModuleInfo . |
default Class<?> |
loadDelegateClass()
Loads the class containing the module's actual implementation.
|
void |
removeInput(ModuleItem<?> input)
Removes an input from the list.
|
void |
removeOutput(ModuleItem<?> output)
Removes an output from the list.
|
void |
setModuleClass(Class<? extends Module> moduleClass)
Sets the module class described by this
ModuleInfo . |
canCancel, canPreview, canRunHeadless, getIdentifier, getInitializer, getInput, getInput, getLocation, getOutput, getOutput, getProblems, getTitle, getVersion, inputs, isInteractive, isValid, outputs, update
compareTo, getIconPath, getMenuPath, getMenuRoot, getSelectionGroup, isEnabled, isSelectable, isSelected, isVisible, setEnabled, setIconPath, setMenuPath, setMenuRoot, setSelectable, setSelected, setSelectionGroup, setVisible
get, getDescription, getLabel, is, set, setDescription, setLabel
getPriority, setPriority
void setModuleClass(Class<? extends Module> moduleClass)
ModuleInfo
.Class<? extends Module> getModuleClass()
ModuleInfo
.void addInput(ModuleItem<?> input)
void addOutput(ModuleItem<?> output)
void removeInput(ModuleItem<?> input)
void removeOutput(ModuleItem<?> output)
default String getDelegateClassName()
ModuleInfo
createModule().getDelegateObject().getClass().getName()
, and hence
is also the class containing any callback methods specified by
ModuleItem.getCallback()
.
The nature of this method is implementation-specific; for example, a
CommandModule
will return the class name of its associated
Command
. 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 by createModule().getClass().getName()
).
getDelegateClassName
in interface ModuleInfo
default Class<?> loadDelegateClass()
ModuleInfo
ModuleInfo.getDelegateClassName()
.loadDelegateClass
in interface ModuleInfo
Instantiable.loadClass()
default Module createModule() throws ModuleException
ModuleInfo
createModule
in interface ModuleInfo
ModuleException
Copyright © 2015–2022 SciJava. All rights reserved.