Package VASSAL.script
Class BeanShell
java.lang.Object
VASSAL.script.BeanShell
Class encapsulating BeanShell support in Vassal
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
protected ScriptInterpreter
protected static String
static String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
executeActionScript(String scriptName)
Execute a Script named in a component DoAction or trait DoAction.bsh.NameSpace
Return the Vassal shared NameSpacestatic BeanShell
void
init()
static boolean
validateExpression(String expression)
Parse and validate a single expression or script.static Object
Convert a String value into a wrapped primitive object if possible.
-
Field Details
-
TRUE
- See Also:
- Constant Field Values
-
FALSE
- See Also:
- Constant Field Values
-
INIT_SCRIPT
- See Also:
- Constant Field Values
-
globalInterpreter
-
-
Constructor Details
-
BeanShell
public BeanShell()
-
-
Method Details
-
getInstance
-
init
public void init() -
compile
-
getGlobalNameSpace
public bsh.NameSpace getGlobalNameSpace()Return the Vassal shared NameSpace- Returns:
- Global NameSpace
-
executeActionScript
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
Parse and validate a single expression or script. No evaluation or checking for undefined variables- Parameters:
expression
- Expression to validate
-
wrap
Convert a String value into a wrapped primitive object if possible.- Parameters:
value
- Value to Wrap- Returns:
- wrapped value
-