uwcse.graphics
Class JevaUW

java.lang.Object
  |
  +--uwcse.graphics.JevaUW

public class JevaUW
extends java.lang.Object

A simple wrapper around the JevaCLI to capture input and output and dump it to a file.


Inner Class Summary
(package private)  class JevaUW.InputFilter
          InputFilter consumes the users input, passes is onwards, and dumps it to the give Writer.
(package private)  class JevaUW.OutputFilter
          The OutputFilter consumes the Jeva output, dumps it to the tracefile and passes along the output to the given writer.
 
Field Summary
(package private) static java.lang.String defaultInitStatements
           
(package private) static java.lang.String defaultTraceFileName
           
(package private)  java.io.Reader in
           
(package private)  java.io.PrintWriter out
           
(package private)  java.lang.String standardInit
           
(package private) static JevaUW theInterpreter
           
(package private)  java.lang.String traceFileName
           
(package private) static java.lang.String welcome
           
 
Constructor Summary
JevaUW(JevaUW old)
          Create a new Jeva wrapper, using the old Jeva wrapper's tracefile, and standard input and output.
JevaUW(java.lang.String traceFileName, java.lang.String initStatements)
          Create a new Jeva wrapper, using the provided traceFileName as a trace file.
 
Method Summary
static void fileIn(java.lang.String fromFile)
          Start a new read-eval-print-loop, with the initial statements coming from the given fromFile.
static void main(java.lang.String[] args)
           
 void repl()
          Start the read-eval-print-loop and go forever.
 void repl(java.lang.String inFileName)
          Start a read-eval-printloop, using the contents of the given file as initial statements.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theInterpreter

static JevaUW theInterpreter

welcome

static java.lang.String welcome

defaultTraceFileName

static java.lang.String defaultTraceFileName

defaultInitStatements

static java.lang.String defaultInitStatements

traceFileName

java.lang.String traceFileName

in

java.io.Reader in

out

java.io.PrintWriter out

standardInit

java.lang.String standardInit
Constructor Detail

JevaUW

public JevaUW(java.lang.String traceFileName,
              java.lang.String initStatements)
       throws java.io.IOException
Create a new Jeva wrapper, using the provided traceFileName as a trace file.

JevaUW

public JevaUW(JevaUW old)
Create a new Jeva wrapper, using the old Jeva wrapper's tracefile, and standard input and output. The new Jeva wrapper will not have access to the environment of the old wrapper.
Method Detail

repl

public void repl()
          throws java.lang.Throwable
Start the read-eval-print-loop and go forever.

repl

public void repl(java.lang.String inFileName)
          throws java.lang.Throwable
Start a read-eval-printloop, using the contents of the given file as initial statements.

fileIn

public static void fileIn(java.lang.String fromFile)
Start a new read-eval-print-loop, with the initial statements coming from the given fromFile. If an interpreter is already active, the tracefile, and input/output of that interpreter is used. If not a new interpreter is initialized.

main

public static void main(java.lang.String[] args)