## 接口的使用
org.springframework.scripting.ScriptSource

- 使用ScriptSource的程序包
  程序包 | 说明
  --- | ---
  org.springframework.scripting | Core interfaces for Spring's scripting support.
  org.springframework.scripting.bsh | Package providing integration of BeanShell (and BeanShell2) into Spring's scripting infrastructure.
  org.springframework.scripting.groovy | Package providing integration of Groovy into Spring's scripting infrastructure.
  org.springframework.scripting.support | Support classes for Spring's scripting package.

- - ### org.springframework.scripting中ScriptSource的使用

    返回ScriptSource的org.springframework.scripting中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `ScriptSource` | ScriptCompilationException.`getScriptSource()` Return the source for the offending script.

    参数类型为ScriptSource的org.springframework.scripting中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | ScriptEvaluator.`evaluate(ScriptSource script)` Evaluate the given script.
    `Object` | ScriptEvaluator.`evaluate(ScriptSource script, Map<String,Object> arguments)` Evaluate the given script with the given arguments.
    `Object` | ScriptFactory.`getScriptedObject(ScriptSource scriptSource, Class<?>... actualInterfaces)` Factory method for creating the scripted Java object.
    `Class<?>` | ScriptFactory.`getScriptedObjectType(ScriptSource scriptSource)` Determine the type of the scripted Java object.
    `boolean` | ScriptFactory.`requiresScriptedObjectRefresh(ScriptSource scriptSource)` Determine whether a refresh is required (e.g. through ScriptSource's `isModified()` method).

    参数类型为ScriptSource的org.springframework.scripting中的构造器
    构造器和说明
    `ScriptCompilationException(ScriptSource scriptSource, String msg)` Constructor for ScriptCompilationException.
    `ScriptCompilationException(ScriptSource scriptSource, String msg, Throwable cause)` Constructor for ScriptCompilationException.
    `ScriptCompilationException(ScriptSource scriptSource, Throwable cause)` Constructor for ScriptCompilationException.

  - ### org.springframework.scripting.bsh中ScriptSource的使用

    参数类型为ScriptSource的org.springframework.scripting.bsh中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | BshScriptEvaluator.`evaluate(ScriptSource script)`
    `Object` | BshScriptEvaluator.`evaluate(ScriptSource script, Map<String,Object> arguments)`
    `Object` | BshScriptFactory.`getScriptedObject(ScriptSource scriptSource, Class<?>... actualInterfaces)` Load and parse the BeanShell script via `BshScriptUtils`.
    `Class<?>` | BshScriptFactory.`getScriptedObjectType(ScriptSource scriptSource)`
    `boolean` | BshScriptFactory.`requiresScriptedObjectRefresh(ScriptSource scriptSource)`

  - ### org.springframework.scripting.groovy中ScriptSource的使用

    参数类型为ScriptSource的org.springframework.scripting.groovy中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | GroovyScriptEvaluator.`evaluate(ScriptSource script)`
    `Object` | GroovyScriptEvaluator.`evaluate(ScriptSource script, Map<String,Object> arguments)`
    `protected Object` | GroovyScriptFactory.`executeScript(ScriptSource scriptSource, Class<?> scriptClass)` Instantiate the given Groovy script class and run it if necessary.
    `Object` | GroovyScriptFactory.`getScriptedObject(ScriptSource scriptSource, Class<?>... actualInterfaces)` Loads and parses the Groovy script via the GroovyClassLoader.
    `Class<?>` | GroovyScriptFactory.`getScriptedObjectType(ScriptSource scriptSource)`
    `boolean` | GroovyScriptFactory.`requiresScriptedObjectRefresh(ScriptSource scriptSource)`

  - ### org.springframework.scripting.support中ScriptSource的使用

    实现ScriptSource的org.springframework.scripting.support中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `ResourceScriptSource` `ScriptSource` implementation based on Spring's `Resource` abstraction.
    `class` | `StaticScriptSource` Static implementation of the `ScriptSource` interface, encapsulating a given String that contains the script source text.

    返回ScriptSource的org.springframework.scripting.support中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected ScriptSource` | ScriptFactoryPostProcessor.`convertToScriptSource(String beanName, String scriptSourceLocator, org.springframework.core.io.ResourceLoader resourceLoader)` Convert the given script source locator to a ScriptSource instance.
    `protected ScriptSource` | ScriptFactoryPostProcessor.`getScriptSource(String beanName, String scriptSourceLocator)` Obtain a ScriptSource for the given bean, lazily creating it if not cached already.

    参数类型为ScriptSource的org.springframework.scripting.support中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected Object` | StandardScriptFactory.`adaptToInterfaces(Object script, ScriptSource scriptSource, Class<?>... actualInterfaces)`
    `protected org.springframework.beans.factory.config.BeanDefinition` | ScriptFactoryPostProcessor.`createScriptedObjectBeanDefinition(org.springframework.beans.factory.config.BeanDefinition bd, String scriptFactoryBeanName, ScriptSource scriptSource, Class<?>[] interfaces)` Create a bean definition for the scripted object, based on the given script definition, extracting the definition data that is relevant for the scripted object (that is, everything but bean class and constructor arguments).
    `Object` | StandardScriptEvaluator.`evaluate(ScriptSource script)`
    `Object` | StandardScriptEvaluator.`evaluate(ScriptSource script, Map<String,Object> argumentBindings)`
    `protected Object` | StandardScriptFactory.`evaluateScript(ScriptSource scriptSource)`
    `Object` | StandardScriptFactory.`getScriptedObject(ScriptSource scriptSource, Class<?>... actualInterfaces)` Load and parse the script via JSR-223's ScriptEngine.
    `Class<?>` | StandardScriptFactory.`getScriptedObjectType(ScriptSource scriptSource)`
    `protected ScriptEngine` | StandardScriptEvaluator.`getScriptEngine(ScriptSource script)` Obtain the JSR-223 ScriptEngine to use for the given script.
    `boolean` | StandardScriptFactory.`requiresScriptedObjectRefresh(ScriptSource scriptSource)`
    `protected ScriptEngine` | StandardScriptFactory.`retrieveScriptEngine(ScriptSource scriptSource)`

    参数类型为ScriptSource的org.springframework.scripting.support中的构造器
    构造器和说明
    `RefreshableScriptTargetSource(org.springframework.beans.factory.BeanFactory beanFactory, String beanName, ScriptFactory scriptFactory, ScriptSource scriptSource, boolean isFactoryBean)` Create a new RefreshableScriptTargetSource.