public abstract class JRubyScriptUtils extends Object
As of Spring 3.0, this class requires JRuby 1.1 or higher.
Modifier and Type | Class and Description |
---|---|
static class |
JRubyScriptUtils.JRubyExecutionException
Exception thrown in response to a JRuby
RaiseException
being thrown from a JRuby method invocation. |
Constructor and Description |
---|
JRubyScriptUtils() |
Modifier and Type | Method and Description |
---|---|
static Object |
createJRubyObject(String scriptSource,
Class[] interfaces)
Create a new JRuby-scripted object from the given script source,
using the default
ClassLoader . |
static Object |
createJRubyObject(String scriptSource,
Class[] interfaces,
ClassLoader classLoader)
Create a new JRuby-scripted object from the given script source.
|
public static Object createJRubyObject(String scriptSource, Class[] interfaces) throws org.jruby.exceptions.JumpException
ClassLoader
.scriptSource
- the script source textinterfaces
- the interfaces that the scripted Java object is to implementorg.jruby.exceptions.JumpException
- in case of JRuby parsing failureClassUtils.getDefaultClassLoader()
public static Object createJRubyObject(String scriptSource, Class[] interfaces, ClassLoader classLoader)
scriptSource
- the script source textinterfaces
- the interfaces that the scripted Java object is to implementclassLoader
- the ClassLoader
to create the script proxy withorg.jruby.exceptions.JumpException
- in case of JRuby parsing failure