Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## scripting
Class BeanShell

    java.lang.Object
      scripting.BeanShell

    public class BeanShell

extends java.lang.Object

This class provides an interface to use beanshell scripts in the game

Author:
  Frank Bruns

Constructor Summary
`BeanShell()` Creates a new beanshell interpreter object

Method Summary
`void` | `addGameLocation(GameLocation g)` Adds a game location to the beanshell script interpreter
`static void` | `executeScript(java.lang.String scriptFile)` Executes the specified beanshell script file line by line
`void` | `initGameLocations()` Intialize the beanshell interpreter with the game locations that have been added to the interpreter before
`static void` | `invoke(java.lang.String methodName)` Invoke a method from the beanshell script of the current game location

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BeanShell

    public BeanShell()

  Creates a new beanshell interpreter object

Method Detail

### addGameLocation

    public void addGameLocation(GameLocation g)

  Adds a game location to the beanshell script interpreter

  Parameters:
    `g` - game location to add to the beanshell interpreter

### initGameLocations

    public void initGameLocations()

  Intialize the beanshell interpreter with the game locations that have been added to the interpreter before

### invoke

    public static void invoke(java.lang.String methodName)

  Invoke a method from the beanshell script of the current game location

  Parameters:
    `methodName` - method name in the .bsh script file

### executeScript

    public static void executeScript(java.lang.String scriptFile)

  Executes the specified beanshell script file line by line

  Parameters:
    `scriptFile` - bsh script file to execute

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD