Package ghidra.app.script
Class ScriptControls
java.lang.Object
ghidra.app.script.ScriptControls
Class to encapsulate
GhidraScript control mechanisms such as stdout/stderr writers and
other feedback to the user-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScriptControls(ghidra.app.plugin.core.interpreter.InterpreterConsole console, TaskMonitor monitor) Creates a newScriptControlswith no decorated outputScriptControls(ConsoleService console, TaskMonitor monitor) Creates a newScriptControlswith no decorated outputScriptControls(OutputStream stream, OutputStream errorStream, TaskMonitor monitor) Creates a newScriptControlswith no decorated outputScriptControls(PrintWriter writer, PrintWriter errorWriter, boolean decorateOutput, TaskMonitor monitor) Creates a newScriptControlsScriptControls(PrintWriter writer, PrintWriter errorWriter, TaskMonitor monitor) Creates a newScriptControlswith no decorated output -
Method Summary
Modifier and TypeMethodDescriptionReturns the target of script "printerr" statements (may be null).Returns A cancellable monitor.Returns the target of script "print" statements (may be null).booleanReturns True to decorate the writer output with a script name prefix; otherwise, false.
-
Field Details
-
NONE
AScriptControlsthat does nothing
-
-
Constructor Details
-
ScriptControls
public ScriptControls(PrintWriter writer, PrintWriter errorWriter, boolean decorateOutput, TaskMonitor monitor) Creates a newScriptControls- Parameters:
writer- The target of script "print" statements (may be null)errorWriter- The target of script "printerr" statements (may be null)decorateOutput- True to decorate the writer output with a script name prefix; otherwise, false (seeGhidraScript.decorate(String)monitor- A cancellable monitor
-
ScriptControls
Creates a newScriptControlswith no decorated output- Parameters:
writer- The target of script "print" statements (may be null)errorWriter- The target of script "printerr" statements (may be null) otherwise, false (seeGhidraScript.decorate(String)monitor- A cancellable monitor
-
ScriptControls
Creates a newScriptControlswith no decorated output- Parameters:
stream- The target of script "print" statements (may be null)errorStream- The target of script "printerr" statements (may be null) otherwise, false (seeGhidraScript.decorate(String)monitor- A cancellable monitor
-
ScriptControls
Creates a newScriptControlswith no decorated output- Parameters:
console- The target of script "print" and "printerr" statementsmonitor- A cancellable monitor
-
ScriptControls
public ScriptControls(ghidra.app.plugin.core.interpreter.InterpreterConsole console, TaskMonitor monitor) Creates a newScriptControlswith no decorated output- Parameters:
console- The target of script "print" and "printerr" statementsmonitor- A cancellable monitor
-
-
Method Details
-
getWriter
Returns the target of script "print" statements (may be null).- Returns:
- the target of script "print" statements (may be null)
-
getErrorWriter
Returns the target of script "printerr" statements (may be null).- Returns:
- the target of script "printerr" statements (may be null)
-
shouldDecorateOutput
public boolean shouldDecorateOutput()Returns True to decorate the writer output with a script name prefix; otherwise, false.- Returns:
- True to decorate the writer output with a script name prefix; otherwise, false
- See Also:
-
getMonitor
Returns A cancellable monitor.- Returns:
- A cancellable monitor
-