assignIsolation
Sets the isolation level for the underlying JavaScriptEngine.
Isolation.IsolatedClassLoader hides the host application's classes from the script, so a variable whose class comes from the host, rather than the JDK, cannot be used under it; keep the default Isolation.CallerClassLoader for those. Both levels compile each script into a class loader of its own.
Parameters
isolation
the Isolation level to apply