Package weka.gui.scripting
Class GroovyScript
java.lang.Object
weka.gui.scripting.Script
weka.gui.scripting.GroovyScript
- All Implemented Interfaces:
Serializable
,OptionHandler
Represents a Groovy script.
- Version:
- $Revision: 8034 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Executes a Groovy script in a thread.Nested classes/interfaces inherited from class weka.gui.scripting.Script
Script.ScriptThread
-
Field Summary
Fields inherited from class weka.gui.scripting.Script
BACKUP_EXTENSION
-
Constructor Summary
ConstructorDescriptionInitializes the script.GroovyScript
(Document doc) Initializes the script.GroovyScript
(Document doc, File file) Initializes the script. -
Method Summary
Modifier and TypeMethodDescriptionReturns the default extension.Returns the extension filters for this type of script.static void
Runs the script from commandline.Returns a new thread to execute.Methods inherited from class weka.gui.scripting.Script
addScriptFinishedListener, empty, getContent, getFilename, getNewLine, getOptions, isModified, isRunning, listOptions, open, removeScriptFinishedListener, run, runScript, save, saveAs, setContent, setOptions, start, stop, toString
-
Constructor Details
-
GroovyScript
public GroovyScript()Initializes the script. -
GroovyScript
Initializes the script.- Parameters:
doc
- the document to use as basis
-
GroovyScript
Initializes the script. Automatically loads the specified file, if not null.- Parameters:
doc
- the document to use as basisfile
- the file to load (if not null)
-
-
Method Details
-
getFilters
Returns the extension filters for this type of script.- Specified by:
getFilters
in classScript
- Returns:
- the filters
-
getDefaultExtension
Returns the default extension. Gets automatically added to files if their name doesn't end with this.- Specified by:
getDefaultExtension
in classScript
- Returns:
- the default extension (incl. the dot)
- See Also:
-
newThread
Returns a new thread to execute. -
main
Runs the script from commandline. Use "-h" to list all options.- Parameters:
args
- the commandline arguments- Throws:
Exception
- if execution fails
-