public Object evaluateString ( String scriptName , String source , Bindings bindings ) { try { scriptEngine . put ( ScriptEngine . FILENAME , scriptName ) ; return scriptEngine . eval ( source , bindings ) ; } catch ( ScriptException e ) { throw new BundlingProcessException ( "Error while evaluating script : " + scriptName , e ) ; } }
Evaluates the JS passed in parameter