当前页面:
在线文档首页 >
Spring Framework 2.0.5 API 文档英文版
JRubyScriptUtils (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版
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 higher.
- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller, Rick Evans
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JRubyScriptUtils
public JRubyScriptUtils()
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 textinterfaces
- 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 textinterfaces
- the interfaces that the scripted Java object is to implementclassLoader
- the ClassLoader
to create the script proxy with
- Returns:
- the scripted Java object
- Throws:
org.jruby.exceptions.JumpException
- in case of JRuby parsing failure
Copyright © 2002-2007 The Spring Framework.