public abstract class

JRubyScriptUtils

extends Object
java.lang.Object
   ↳ org.springframework.scripting.jruby.JRubyScriptUtils

Class Overview

Utility methods for handling JRuby-scripted objects.

As of Spring 3.0, this class requires JRuby 1.1 or higher.

Summary

Nested Classes
class JRubyScriptUtils.JRubyExecutionException Exception thrown in response to a JRuby RaiseException being thrown from a JRuby method invocation. 
Public Constructors
JRubyScriptUtils()
Public Methods
static Object createJRubyObject(String scriptSource, Class[] interfaces, ClassLoader classLoader)
Create a new JRuby-scripted object from the given script source.
static Object createJRubyObject(String scriptSource, Class[] interfaces)
Create a new JRuby-scripted object from the given script source, using the default ClassLoader.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JRubyScriptUtils ()

Public Methods

public static Object createJRubyObject (String scriptSource, Class[] interfaces, ClassLoader classLoader)

Create a new JRuby-scripted object from the given script source.

Parameters
scriptSource the script source text
interfaces the interfaces that the scripted Java object is to implement
classLoader the ClassLoader to create the script proxy with
Returns
  • the scripted Java object
Throws
in case of JRuby parsing failure

public static Object createJRubyObject (String scriptSource, Class[] interfaces)

Create a new JRuby-scripted object from the given script source, using the default ClassLoader.

Parameters
scriptSource the script source text
interfaces the interfaces that the scripted Java object is to implement
Returns
  • the scripted Java object
Throws
in case of JRuby parsing failure
JumpException