Package cz.vutbr.fit.layout.console
Class Console
- java.lang.Object
-
- cz.vutbr.fit.layout.console.Console
-
public class Console extends Object
- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description Console()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexit()protected ScriptableProcessorgetProcessor()protected voidinit()This is called when the console is created.protected voidinitSession()This function is called at the beginning of the interactive session.voidinteractiveSession(InputStream in, PrintStream out, PrintStream err)voidlogToFile(String path, String text)static voidmain(String[] args)protected Stringprompt()voidtruncateFile(String path)
-
-
-
Method Detail
-
interactiveSession
public void interactiveSession(InputStream in, PrintStream out, PrintStream err) throws IOException
- Throws:
IOException
-
prompt
protected String prompt()
-
getProcessor
protected ScriptableProcessor getProcessor()
-
init
protected void init()
This is called when the console is created. Usable for adding custom object to the script engine.
-
initSession
protected void initSession() throws ScriptExceptionThis function is called at the beginning of the interactive session. Usable for executing various init scripts.- Throws:
ScriptException
-
exit
public void exit()
-
truncateFile
public void truncateFile(String path)
-
main
public static void main(String[] args)
-
-