类 BshScriptFactory

java.lang.Object
cn.taketoday.scripting.bsh.BshScriptFactory
所有已实现的接口:
Aware, BeanClassLoaderAware, ScriptFactory

public class BshScriptFactory extends Object implements ScriptFactory, BeanClassLoaderAware
ScriptFactory implementation for a BeanShell script.

Typically used in combination with a ScriptFactoryPostProcessor; see the latter's javadoc for a configuration example.

从以下版本开始:
4.0
作者:
Juergen Hoeller, Rob Harrop
另请参阅:
  • 构造器详细资料

    • BshScriptFactory

      public BshScriptFactory(String scriptSourceLocator)
      Create a new BshScriptFactory for the given script source.

      With this BshScriptFactory variant, the script needs to declare a full class or return an actual instance of the scripted object.

      参数:
      scriptSourceLocator - a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
    • BshScriptFactory

      public BshScriptFactory(String scriptSourceLocator, @Nullable Class<?>... scriptInterfaces)
      Create a new BshScriptFactory for 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).

      参数:
      scriptSourceLocator - a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
      scriptInterfaces - the Java interfaces that the scripted object is supposed to implement (may be null)
  • 方法详细资料