Package org.scijava.main
Class DefaultMainService
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.service.AbstractService
-
- org.scijava.main.DefaultMainService
-
- All Implemented Interfaces:
Comparable<Prioritized>,Contextual,Disposable,Identifiable,Initializable,Locatable,Logged,MainService,HasPluginInfo,RichPlugin,SciJavaPlugin,Prioritized,SciJavaService,Service,Versioned
public class DefaultMainService extends AbstractService implements MainService
Default implementation ofMainService.- Author:
- Curtis Rueden
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.scijava.main.MainService
MainService.Main
-
-
Constructor Summary
Constructors Constructor Description DefaultMainService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMain(String className, String... args)Registers a main class to be executed byMainService.execMains().intexecMains()Executes registered main classes, in the order they were registered.MainService.Main[]getMains()Gets the registered main classes to execute.-
Methods inherited from class org.scijava.service.AbstractService
getContext, setContext, toString
-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority
-
Methods inherited from class org.scijava.AbstractContextual
context
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
execMains
public int execMains()
Description copied from interface:MainServiceExecutes registered main classes, in the order they were registered.- Specified by:
execMainsin interfaceMainService- Returns:
- The number of main methods which were executed.
-
addMain
public void addMain(String className, String... args)
Description copied from interface:MainServiceRegisters a main class to be executed byMainService.execMains().- Specified by:
addMainin interfaceMainService
-
getMains
public MainService.Main[] getMains()
Description copied from interface:MainServiceGets the registered main classes to execute.- Specified by:
getMainsin interfaceMainService
-
-