Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.scripting.jruby
Class JRubyScriptUtils

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

    public abstract class JRubyScriptUtils

extends Object

Utility methods for handling JRuby-scripted objects.

Note: As of Spring 2.0.4, this class requires JRuby 0.9.8 or 0.9.9. As of Spring 2.0.6, it supports JRuby 1.0 as well.

Since:
  2.0
Author:
  Rob Harrop, Juergen Hoeller, Rick Evans

Nested Class Summary
`static class` | `JRubyScriptUtils.JRubyExecutionException` Exception thrown in response to a JRuby `RaiseException` being thrown from a JRuby method invocation.

Constructor Summary
`JRubyScriptUtils()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JRubyScriptUtils

    public JRubyScriptUtils()

Method Detail

### createJRubyObject

    public static Object createJRubyObject(String scriptSource,
                                           Class[] interfaces)
                                    throws org.jruby.exceptions.JumpException

  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:
    `org.jruby.exceptions.JumpException` - in case of JRuby parsing failure
  See Also:
    `ClassUtils.getDefaultClassLoader()`

### createJRubyObject

    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:
    `org.jruby.exceptions.JumpException` - in case of JRuby parsing failure

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2007 The Spring Framework.