SS 2007 Software Engineering 2 Albert Zündorf, University of Kassel 55 Action Language m Action Language Bean-Shell www.beanshell.org import bsh.Interpreter; Interpreter i = new Interpreter(); // Construct an interpreter i.set( foo , 5); // Set variables i.set( date , new Date() ); Date date = (Date)i.get( date ); // retrieve a value from a variable // Eval a statement and get the result i.eval( bar = foo*10 ); System.out.println( i.get( bar ) ); // Source an external script file i.source( somefile.bsh );
{}