org.springframework.scripting.bsh

Class BshScriptFactory

  • java.lang.Object
    • org.springframework.scripting.bsh.BshScriptFactory
    • Constructor Summary

      Constructors 
      Constructor and Description
      BshScriptFactory(java.lang.String scriptSourceLocator)
      Create a new BshScriptFactory for the given script source.
      BshScriptFactory(java.lang.String scriptSourceLocator, java.lang.Class<?>... scriptInterfaces)
      Create a new BshScriptFactory for the given script source.
    • Constructor Detail

      • BshScriptFactory

        public BshScriptFactory(java.lang.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.

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

        public BshScriptFactory(java.lang.String scriptSourceLocator,
                                @Nullable
                                java.lang.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).

        Parameters:
        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)