Package org.scijava.script
Class ScriptFinder
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.script.ScriptFinder
-
- All Implemented Interfaces:
Contextual
public class ScriptFinder extends AbstractContextual
Discovers scripts.To accomplish this, we crawl the directories specified by
ScriptService.getScriptDirectories(). By default, those directories include thescriptsandplugins/Scriptsfolders off the SciJava application's base directory.- Author:
- Johannes Schindelin, Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description ScriptFinder(Context context)Creates a new script finder.ScriptFinder(Context context, String pathPrefix)Creates a new script finder.ScriptFinder(ScriptService scriptService)Deprecated.UseScriptFinder(Context)instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfindScripts(List<ScriptInfo> scripts)Discovers the scripts.-
Methods inherited from class org.scijava.AbstractContextual
context, getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
setContext
-
-
-
-
Constructor Detail
-
ScriptFinder
public ScriptFinder(Context context)
Creates a new script finder.- Parameters:
context- The SciJava application context housing needed services.
-
ScriptFinder
public ScriptFinder(Context context, String pathPrefix)
Creates a new script finder.- Parameters:
context- The SciJava application context housing needed services.pathPrefix- the path prefix beneath which to scan classpath resources, or null to skip classpath scanning.
-
ScriptFinder
@Deprecated public ScriptFinder(ScriptService scriptService)
Deprecated.UseScriptFinder(Context)instead.
-
-
Method Detail
-
findScripts
public void findScripts(List<ScriptInfo> scripts)
Discovers the scripts.- Parameters:
scripts- The collection to which the discovered scripts are added.
-
-