code: public Script instantiate(Class<? extends Script> clazz, Context cx) throws EvaluatorException {
  		try {
  			GeneratedClassLoader loader = SecurityController.createLoader(
  					cx.getApplicationClassLoader(), securityDomain);
  			loader.linkClass(clazz);
  			if (!Script.class.isAssignableFrom(clazz)) {
  				throw Context.reportRuntimeError("msg.must.implement.Script");
  			}
  			return clazz.newInstance();
  		} catch (InstantiationException e) {
  			Context.reportError(e.getMessage());
  			throw Context.reportRuntimeError(e.getMessage());
  		} catch (IllegalAccessException e) {
  			Context.reportError(e.getMessage());
  			throw Context.reportRuntimeError(e.getMessage());
  		}
  		/*} catch (RhinoException e) {
  			ToolErrorReporter.reportException(cx.getErrorReporter(), e);
  			throw Context.reportRuntimeError(e.getMessage());
  		*/
  	}
docs: TODO