com.hammurapi.common

## Class ScriptProcessor

- java.lang.Object
- - com.hammurapi.common.ScriptProcessor

-     public class ScriptProcessor
      extends Object

  This class resolves and evaluates scripts for a class. Scripts and properties for script parameterization are resolved traversing class hierarchy. A special resource with .binder extension is used to create custom bindings for script evaluation. This resource shall contain a fragment of java code. This code shall reference a single parameter 'bindings' to access existing bindings and create new ones. The primary purpose of this class is to be a facility for flexible rendering/code generation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScriptProcessor(ResourceLoader resourceLoader, ClassLoader scriptEnginesClassLoader)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `eval(String scriptName, Map<String,Object> bindings, Locale locale)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ScriptProcessor

          public ScriptProcessor(ResourceLoader resourceLoader,
                         ClassLoader scriptEnginesClassLoader)

  - ### Method Detail

    - #### eval

          public Object eval(String scriptName,
                    Map<String,Object> bindings,
                    Locale locale)
                      throws ScriptException

      Throws:
        `ScriptException`