protected boolean isCachable ( ScriptEngine scriptEngine ) { // Check if script-engine supports multithreading. If true it can be cached. Object threadingParameter = scriptEngine . getFactory ( ) . getParameter ( "THREADING" ) ; return threadingParameter != null ; }
Allows checking whether the script engine can be cached .