Class BshScriptUtils
java.lang.Object
org.springframework.scripting.bsh.BshScriptUtils
Deprecated.
with no replacement as not actively maintained anymore
Utility methods for handling BeanShell-scripted objects.
- Since:
 - 2.0
 - Author:
 - Rob Harrop, Juergen Hoeller
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDeprecated.Exception to be thrown on script execution failure. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectcreateBshObject(String scriptSource) Deprecated.Create a new BeanShell-scripted object from the given script source.static ObjectcreateBshObject(String scriptSource, Class<?> @Nullable ... scriptInterfaces) Deprecated.Create a new BeanShell-scripted object from the given script source, using the default ClassLoader.static ObjectcreateBshObject(String scriptSource, Class<?> @Nullable [] scriptInterfaces, @Nullable ClassLoader classLoader) Deprecated.Create a new BeanShell-scripted object from the given script source. 
- 
Constructor Details
- 
BshScriptUtils
public BshScriptUtils()Deprecated. 
 - 
 - 
Method Details
- 
createBshObject
Deprecated.Create a new BeanShell-scripted object from the given script source.With this
createBshObjectvariant, the script needs to declare a full class or return an actual instance of the scripted object.- Parameters:
 scriptSource- the script source text- Returns:
 - the scripted Java object
 - Throws:
 bsh.EvalError- in case of BeanShell parsing failure
 - 
createBshObject
public static Object createBshObject(String scriptSource, Class<?> @Nullable ... scriptInterfaces) throws bsh.EvalError Deprecated.Create a new BeanShell-scripted object from the given script source, using the default ClassLoader.The script may either be a simple script that needs a corresponding proxy generated (implementing the specified interfaces), or declare a full class or return an actual instance of the scripted object (in which case the specified interfaces, if any, need to be implemented by that class/instance).
- Parameters:
 scriptSource- the script source textscriptInterfaces- the interfaces that the scripted Java object is supposed to implement (may benullor empty if the script itself declares a full class or returns an actual instance of the scripted object)- Returns:
 - the scripted Java object
 - Throws:
 bsh.EvalError- in case of BeanShell parsing failure- See Also:
 
 - 
createBshObject
public static Object createBshObject(String scriptSource, Class<?> @Nullable [] scriptInterfaces, @Nullable ClassLoader classLoader) throws bsh.EvalError Deprecated.Create a new BeanShell-scripted object from the given script source.The script may either be a simple script that needs a corresponding proxy generated (implementing the specified interfaces), or declare a full class or return an actual instance of the scripted object (in which case the specified interfaces, if any, need to be implemented by that class/instance).
- Parameters:
 scriptSource- the script source textscriptInterfaces- the interfaces that the scripted Java object is supposed to implement (may benullor empty if the script itself declares a full class or returns an actual instance of the scripted object)classLoader- the ClassLoader to use for evaluating the script- Returns:
 - the scripted Java object
 - Throws:
 bsh.EvalError- in case of BeanShell parsing failure
 
 -