public static ScriptEnvironment getTemporaryEnvironment ( String environmentName ) { Preconditions . checkArgument ( StringUtils . isNotNullOrBlank ( environmentName ) , "Environment name cannot be null or empty" ) ; ScriptEngine engine = ScriptEnvironmentManager . getInstance ( ) . engineManager . getEngineByName ( environmentName ) ; Preconditions . checkArgument ( engine != null , environmentName + " is an unknown." ) ; return new ScriptEnvironment ( engine ) ; }
Gets a temporary scripting environment given the environment name .