|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.ai.psg.jevaUI.JevaCLI
JevaCLI is a command line (stream) interface for the Jeva Java evalator of expressions & statements. JevaCLI can be used as
JevaGUI,
edu.mit.ai.psg.jeva| Field Summary | |
static String |
continuePromptFormat
|
static String |
promptFormat
Format for the prompt; takes number as single (0th) argument. |
| Method Summary | |
static void |
main(String[] arguments)
Application Startup: Loops accepting top level statements and expressions from System.in . |
static Object |
repl()
Read-Eval-Print-Loop: starts a loop which reads Java expressions and statements from System.in , including return statements to return a value. |
static Object |
repl(int options,
String initialMessage,
Reader inReader,
PrintWriter outWriter,
Class returnClass,
Class[] throwClasses,
IEnv env)
Read-Eval-Print-Loop: starts a loop which reads Java expressions and statements from inStream, including return statements to return a value. |
static void |
replTop()
Top read-eval-print-loop: reads Java expressions and statements from System.in, evaluates them, and prints results of expressions on System.out. |
static void |
replTop(int options)
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static String promptFormat
MessageFormatpublic static String continuePromptFormat
| Method Detail |
public static void main(String[] arguments)
public static void replTop()
public static void replTop(int options)
public static Object repl()
throws Throwable
public static Object repl(int options,
String initialMessage,
Reader inReader,
PrintWriter outWriter,
Class returnClass,
Class[] throwClasses,
IEnv env)
throws Throwable
options - Option flag bits or'ed together; 0 is default. Applets:
require isSuppressingSystemOutAndErrRedirectionBit and
Jeva.isSuppressingPackageNameChecksBit due to security sandbox,initialMessage - Non-null text replaces herald; if called from a
breakpoint, a good practice is to show user contents of env.inReader - Reader from which to read Java constructs.
If null, uses new InputStreamReader(System.in).outWriter - Writer to which to write messages, results.
If null, uses new PrintWriter(System.out, true).returnClass - user may only return a value of this class
(like method return type); Object.class allows anything.
Use void.class for void result.
If null, never returns or throws (like a top level loop).throwClasses - user may only throw Throwables which are instances
of these classes, or instances of Error or RuntimeException
(like method throw declarations).
If null, defaults to no declarations. If returnClass is not
null, then throws are actually thrown; otherwise they are caught
and displayed.env - initial environment created with Jeva.makeDefaultEnv,
Jeva.extendEnv(), or Jeva.parseEval..Statement
If null, defaults to Jeva.makeDefaultEnv() .
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-bugs@ai.mit.edu |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||