Spring Framework ScriptCompilationException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ScriptCompilationException class.

This code example shows how to use the following methods:
			else { 
				return groovyShell.evaluate(script.getScriptAsString());
			} 
		} 
		catch (IOException ex) {
			throw new ScriptCompilationException(script, "Cannot access script", ex);
		} 
		catch (CompilationFailedException ex) {
			throw new ScriptCompilationException(script, "Evaluation failure", ex);
		} 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:
		try { 
			return (bindings != null ? engine.eval(script.getScriptAsString(), bindings) :
					engine.eval(script.getScriptAsString()));
		} 
		catch (IOException ex) {
			throw new ScriptCompilationException(script, "Cannot access script", ex);
		} 
		catch (ScriptException ex) {
			throw new ScriptCompilationException(script, "Evaluation failure", ex);
		} 
	} 
 
	/** 
	 * Obtain the JSR-223 ScriptEngine to use for the given script. 
	 * @param script the script to evaluate 
	 * @return the ScriptEngine (never {@code null}) 
	 */ 
	protected ScriptEngine getScriptEngine(ScriptSource script) {
		if (this.scriptEngineManager == null) {
			this.scriptEngineManager = new ScriptEngineManager();
5
CodeRank
This code example shows how to use the following methods:
		catch (InstantiationException ex) { 
			throw new ScriptCompilationException( 
					this.scriptSource, "Could not instantiate Groovy script class: " + this.scriptClass.getName(), ex); 
		} 
		catch (IllegalAccessException ex) { 
			throw new ScriptCompilationException( 
					this.scriptSource, "Could not access Groovy script constructor: " + this.scriptClass.getName(), ex); 
		} 
	} 
 
	private class BeanFactoryFallbackBinding extends Binding { 
 
		private BeanFactoryFallbackBinding(Map<?, ?> variables) { 
			super(variables); 
		} 
 
		@Override 
		public Object getVariable(String name) { 
			try { 
				return super.getVariable(name); 
4
CodeRank