| Modifier and Type | Class and Description |
|---|---|
| public static class | BshScriptUtils.
Exception to be thrown on script execution failure. |
| private static class | BshScriptUtils.
InvocationHandler that invokes a BeanShell script method. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Object | Returns: the scripted Java objectthe script source text scriptSource)Create a new BeanShell-scripted object from the given script source. |
| public static Object | Returns: the scripted Java objectthe script source text scriptSource, Class<?>... the interfaces that the scripted Java object is
supposed to implement (may be scriptInterfaces)null or empty if the script itself
declares a full class or returns an actual instance of the scripted object)Create a new BeanShell-scripted object from the given script source, using the default ClassLoader. |
| public static Object | Returns: the scripted Java objectthe script source text scriptSource, Class<?>[] the interfaces that the scripted Java object is
supposed to implement (may be scriptInterfaces, ClassLoader null or empty if the script itself
declares a full class or returns an actual instance of the scripted object)the ClassLoader to use for evaluating the script classLoader)Create a new BeanShell-scripted object from the given script source. |
| pack-priv static Class | Returns: the scripted Java class, ornull if none could be determinedthe script source text scriptSource, ClassLoader the ClassLoader to use for evaluating the script classLoader)Evaluate the specified BeanShell script based on the given script source, returning the Class defined by the script. |
| pack-priv static Object | Returns: the scripted Java class or Java objectthe script source text scriptSource, Class<?>[] the interfaces that the scripted Java object is
supposed to implement (may be scriptInterfaces, ClassLoader null or empty if the script itself
declares a full class or returns an actual instance of the scripted object)the ClassLoader to use for evaluating the script classLoader)Evaluate the specified BeanShell script based on the given script source, keeping a returned script Class or script Object as-is. |
| BshScriptUtils | back to summary |
|---|---|
| public BshScriptUtils() | |
| createBshObject | back to summary |
|---|---|
| public static Object createBshObject(String scriptSource) throws EvalError Create a new BeanShell-scripted object from the given script source. With this | |
| createBshObject | back to summary |
|---|---|
| public static Object createBshObject(String scriptSource, Class<?>... scriptInterfaces) throws EvalError 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).
| |
| createBshObject | back to summary |
|---|---|
| public static Object createBshObject(String scriptSource, Class<?>[] scriptInterfaces, ClassLoader classLoader) throws EvalError 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).
| |
| determineBshObjectType | back to summary |
|---|---|
| pack-priv static Class Evaluate the specified BeanShell script based on the given script source, returning the Class defined by the script. The script may either declare a full class or return an actual instance of
the scripted object (in which case the Class of the object will be returned).
In any other case, the returned Class will be
| |
| evaluateBshScript | back to summary |
|---|---|
| pack-priv static Object evaluateBshScript(String scriptSource, Class<?>[] scriptInterfaces, ClassLoader classLoader) throws EvalError Evaluate the specified BeanShell script based on the given script source, keeping a returned script Class or script Object as-is. 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).
| |
| Access | Constructor and Description |
|---|---|
| private |
| BshExecutionException | back to summary |
|---|---|
| private BshExecutionException(EvalError ex) | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | invoke(Object
the proxy instance that the method was invoked on proxy, Method the method, Object[] Method instance corresponding to
the interface method invoked on the proxy instance. The declaring
class of the Method object will be the interface that
the method was declared in, which may be a superinterface of the
proxy interface that the proxy class inherits the method through.an array of objects containing the values of the
arguments passed in the method invocation on the proxy instance,
or args)null if interface method takes no arguments.
Arguments of primitive types are wrapped in instances of the
appropriate primitive wrapper class, such as
java.lang.Integer or java.lang.Boolean.Implements java. Processes a method invocation on a proxy instance and returns the result. |
| private boolean |
| xt | back to summary |
|---|---|
| private final XThis xt | |
| BshObjectInvocationHandler | back to summary |
|---|---|
| public BshObjectInvocationHandler(XThis xt) | |
| invoke | back to summary |
|---|---|
| public Object invoke(Object proxy, Method method, Object[] args) throws Throwable Implements java. Doc from java. Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.
| |
| isProxyForSameBshObject | back to summary |
|---|---|
| private boolean isProxyForSameBshObject(Object obj) | |