类 StandardScriptFactory

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

public class StandardScriptFactory extends Object implements ScriptFactory, BeanClassLoaderAware
ScriptFactory implementation based on the JSR-223 script engine abstraction (as included in Java 6+). Supports JavaScript, Groovy, JRuby, and other JSR-223 compliant engines.

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

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

    • StandardScriptFactory

      public StandardScriptFactory(String scriptSourceLocator)
      Create a new StandardScriptFactory for the given script source.
      参数:
      scriptSourceLocator - a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
    • StandardScriptFactory

      public StandardScriptFactory(String scriptSourceLocator, Class<?>... scriptInterfaces)
      Create a new StandardScriptFactory for the given script source.
      参数:
      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
    • StandardScriptFactory

      public StandardScriptFactory(String scriptEngineName, String scriptSourceLocator)
      Create a new StandardScriptFactory for the given script source.
      参数:
      scriptEngineName - the name of the JSR-223 ScriptEngine to use (explicitly given instead of inferred from the script source)
      scriptSourceLocator - a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
    • StandardScriptFactory

      public StandardScriptFactory(@Nullable String scriptEngineName, String scriptSourceLocator, @Nullable Class<?>... scriptInterfaces)
      Create a new StandardScriptFactory for the given script source.
      参数:
      scriptEngineName - the name of the JSR-223 ScriptEngine to use (explicitly given instead of inferred from the script source)
      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
  • 方法详细资料