Class ScriptEngineFactory

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<groovy.util.GroovyScriptEngine>, org.springframework.beans.factory.InitializingBean

    public class ScriptEngineFactory
    extends org.springframework.beans.factory.config.AbstractFactoryBean<groovy.util.GroovyScriptEngine>
    Implementation of FactoryBean for GroovyScriptEngine
    Since:
    3.1.12
    Author:
    joseross
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean sandboxEnabled
      Indicates if the sandbox should be enabled
      protected String[] urls
      List of relative paths to load scripts
      • Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

        logger
      • Fields inherited from interface org.springframework.beans.factory.FactoryBean

        OBJECT_TYPE_ATTRIBUTE
    • Field Detail

      • urls

        protected String[] urls
        List of relative paths to load scripts
      • sandboxEnabled

        protected boolean sandboxEnabled
        Indicates if the sandbox should be enabled
    • Constructor Detail

      • ScriptEngineFactory

        @ConstructorProperties({"urls","sandboxEnabled"})
        public ScriptEngineFactory​(String[] urls,
                                   boolean sandboxEnabled)
    • Method Detail

      • getObjectType

        public Class<?> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<groovy.util.GroovyScriptEngine>
        Specified by:
        getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<groovy.util.GroovyScriptEngine>
      • createInstance

        protected groovy.util.GroovyScriptEngine createInstance()
                                                         throws Exception
        Specified by:
        createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<groovy.util.GroovyScriptEngine>
        Throws:
        Exception