public class DefaultMATLABService extends AbstractSingletonService<MATLABCommands> implements MATLABService
MATLABService
implementation.Constructor and Description |
---|
DefaultMATLABService() |
Modifier and Type | Method and Description |
---|---|
String |
commandHelp()
Builds a complete usage message by querying the
MATLABCommands.help() method of all available commands. |
void |
dispose()
Performs any needed cleanup of the object's services, in preparation for
the object being retired (e.g., to make garbage collection possible).
|
Class<MATLABCommands> |
getPluginType()
Gets the type of plugins managed by this service.
|
void |
initialize()
Performs any needed initialization when the service is first loaded.
|
void |
initializeCommands()
Creates a MATLAB variable for each
MATLABCommands plugin using the
Plugin.name() property as an identifier. |
void |
makeMATLABVariable(String name,
Object value)
Attempts to create a variable in MATLAB with the give name and value.
|
getInstance, getInstances, objectService, onEvent, onEvent
pluginService
getContext, setContext, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
create, filterInstances, getInstance, getInstances, objectService
getPlugins, getPluginService, pluginService
registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
public String commandHelp()
MATLABService
MATLABCommands.help()
method of all available commands.commandHelp
in interface MATLABService
MATLABCommands
.public void initializeCommands()
MATLABService
MATLABCommands
plugin using the
Plugin.name()
property as an identifier.
For example, if you create an AwesomeMATLABCommands
class with
name=FOO
and method public void bar()
, after calling this
method you will be able to execute FOO.bar
from within MATLAB.
NB: execution of this method requires a valid MATLAB installation.
initializeCommands
in interface MATLABService
public void makeMATLABVariable(String name, Object value)
MATLABService
NB: execution of this method should only be called from within a valid MATLAB installation.
makeMATLABVariable
in interface MATLABService
public void initialize()
Service
NB: This method is not intended to be called directly. It is called by
the service framework itself (specifically by the ServiceHelper
)
when initializing the service. It should not be called a second time.
initialize
in interface Initializable
initialize
in interface SingletonService<MATLABCommands>
initialize
in interface Service
public void dispose()
Disposable
dispose
in interface Disposable
public Class<MATLABCommands> getPluginType()
PTService
getPluginType
in interface PTService<MATLABCommands>
Copyright © 2015–2022 SciJava. All rights reserved.