groovy.ui
Class InteractiveShell

java.lang.Object
  extended bygroovy.ui.InteractiveShell

public class InteractiveShell
extends Object

A simple interactive shell for evaluating groovy expressions on the command line

Version:
$Revision: 1.12 $
Author:
James Strachan, Chris Poirier

Constructor Summary
InteractiveShell()
          Default constructor.
 
Method Summary
static void main(String[] args)
          Entry point when called directly.
protected  String read()
          Reads a single statement from the command line.
protected  void reset()
          Resets the command-line processing machinery after use.
 void run(String[] args)
          Reads commands and statements from input stream and processes them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractiveShell

public InteractiveShell()
Default constructor.

Method Detail

main

public static void main(String[] args)
Entry point when called directly.


run

public void run(String[] args)
         throws Exception
Reads commands and statements from input stream and processes them.

Throws:
Exception

reset

protected void reset()
Resets the command-line processing machinery after use.


read

protected String read()
Reads a single statement from the command line. Also identifies and processes command shell commands. Returns the command text on success, or null when command processing is complete.

NOTE: Changed, for now, to read until 'execute' is issued. At 'execute', the statement must be complete.



Copyright © 2003-2004 The Codehaus. All Rights Reserved.