AutoCloseable
public abstract class ScriptInterpreter extends Object implements AutoCloseable
Constructor | Description |
---|---|
ScriptInterpreter() |
Modifier and Type | Method | Description |
---|---|---|
abstract Object |
getClassMethods(Class<?> classToGet) |
Print all methods of a java class.
|
static ScriptInterpreter |
getEngine() |
|
abstract String |
getFileExtension() |
|
abstract String |
getFileHeader() |
|
abstract boolean |
isClosed() |
|
abstract void |
print(String toPrint) |
Utility function, print a line in console.
|
abstract Object |
runCommand(String command) |
Execute a command.
|
abstract ParsedScript |
runScript(String file) |
Parse and run a script file.
|
abstract void |
setOutput(Writer output) |
Redirect the output.
|
close
public static ScriptInterpreter getEngine()
public abstract ParsedScript runScript(String file) throws ScriptException
file
- File to execute.ScriptException
- If an exception occurs while parsing the script.public abstract Object runCommand(String command) throws ScriptException
command
- Command to execute.ScriptException
- If an exception occurs while parsing the command.public abstract void print(String toPrint)
toPrint
- Line to print.public abstract void setOutput(Writer output)
output
- New script engine output.public abstract Object getClassMethods(Class<?> classToGet)
classToGet
- Class to retrieve methods.public abstract String getFileHeader()
public abstract String getFileExtension()
public abstract boolean isClosed()
Copyright © 2014–2018. All rights reserved.