Class BeanShell

java.lang.Object
VASSAL.script.BeanShell

public class BeanShell extends Object
Class encapsulating BeanShell support in Vassal
  • Field Details

  • Constructor Details

    • BeanShell

      public BeanShell()
  • Method Details

    • getInstance

      public static BeanShell getInstance()
    • init

      public void init()
    • compile

      public CompileResult compile(Reader in)
    • getGlobalNameSpace

      public bsh.NameSpace getGlobalNameSpace()
      Return the Vassal shared NameSpace
      Returns:
      Global NameSpace
    • executeActionScript

      public void executeActionScript(String scriptName)
      Execute a Script named in a component DoAction or trait DoAction. Action Scripts take no parameters and return no value.
      Parameters:
      scriptName - Script name
    • validateExpression

      public static boolean validateExpression(String expression)
      Parse and validate a single expression or script. No evaluation or checking for undefined variables
      Parameters:
      expression - Expression to validate
    • wrap

      public static Object wrap(String value)
      Convert a String value into a wrapped primitive object if possible.
      Parameters:
      value - Value to Wrap
      Returns:
      wrapped value