public Object eval (String source, int lineNo, int columnNo,
Object oscript) throws BSFException {
String script = oscript.toString ();
try {
interp.eval (script);
TclObject result = interp.getResult();
Object internalRep = result.getInternalRep();
// if the object has a corresponding Java type, unwrap it
if (internalRep instanceof ReflectObject)
return ReflectObject.get(interp,result);
if (internalRep instanceof TclString)
return result.toString();
if (internalRep instanceof TclDouble)
return new Double(TclDouble.get(interp,result));
if (internalRep instanceof TclInteger)
return new Integer(TclInteger.get(interp,result));