Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.tools.shell
[Groovy] Class Groovysh

    java.lang.Object
      org.codehaus.groovy.tools.shell.Shell
          org.codehaus.groovy.tools.shell.Groovysh

    class Groovysh
    extends Shell

An interactive shell for evaluating Groovy code from the command-line (aka. groovysh).

Authors:
  Jason Dillon

Version:
  \$Id: Groovysh.groovy 20201 2010-06-03 02:23:08Z roshandawrani \$

Field Summary

Fields inherited from class Shell
log

Property Summary
`BufferManager` | `buffers`
`Closure` | `defaultErrorHook`
`Closure` | `defaultResultHook`
`Closure` | `errorHook`
`jline.History` | `history`
`List` | `imports`
`Interpreter` | `interp`
`Parser` | `parser`
`Closure` | `resultHook`
`InteractiveShellRunner` | `runner`

Constructor Summary
`Groovysh(ClassLoader classLoader, Binding binding, IO io, Closure registrar)`
`Groovysh(ClassLoader classLoader, Binding binding, IO io)`
`Groovysh(Binding binding, IO io)`
`Groovysh(IO io)`
`Groovysh()`

Method Summary
`Object` | `execute(String line)` Execute a single line, where the line may be a command or Groovy code (complete or incomplete).
`protected Object` | `executeCommand(String line)`
`File` | `getUserStateDirectory()`
`int` | `run(String[] args)`
`int` | `run(String commandLine)`

Methods inherited from class Shell
execute, findCommand, isExecutable, leftShift, leftShift, parseLine, register

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Property Detail

### buffers

    final BufferManager buffers

### defaultErrorHook

    final Closure defaultErrorHook

### defaultResultHook

    final Closure defaultResultHook

### errorHook

    Closure errorHook

### history

    jline.History history

### imports

    final List imports

### interp

    final Interpreter interp

### parser

    final Parser parser

### resultHook

    Closure resultHook

### runner

    InteractiveShellRunner runner

Constructor Detail

### Groovysh

    Groovysh(ClassLoader classLoader, Binding binding, IO io, Closure registrar)

### Groovysh

    Groovysh(ClassLoader classLoader, Binding binding, IO io)

### Groovysh

    Groovysh(Binding binding, IO io)

### Groovysh

    Groovysh(IO io)

### Groovysh

    Groovysh()

Method Detail

### execute

    Object execute(String line)

  Execute a single line, where the line may be a command or Groovy code (complete or incomplete).

### executeCommand

    protected Object executeCommand(String line)

### getUserStateDirectory

    File getUserStateDirectory()

### run

    int run(String[] args)

### run

    int run(String commandLine)

Copyright © 2003-2010 The Codehaus. All rights reserved.