com.hammurapi.extract.scripting

## Class ScriptingExtractorFactory

- java.lang.Object
- - com.hammurapi.extract.scripting.ScriptingExtractorFactory

- All Implemented Interfaces:
    ExtractorFactory

      public class ScriptingExtractorFactory
      extends Object
      implements ExtractorFactory

- - ### Field Summary

    - ### Fields inherited from interface com.hammurapi.extract.ExtractorFactory

      `ARGS_BINDING, CONTEXT_BINDING, INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScriptingExtractorFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T,V,C> Extractor<T,V,C>` | `createExtractor(String language, String code, String[] parameterNames, Class<T>[] parameterTypes, Class<V> valueType, Class<C> contextType, ClassLoader classLoader)` Creates extractor.
    `<T,C> Predicate<T,C>` | `createPredicate(String language, String code, String[] parameterNames, Class<T>[] parameterTypes, Class<C> contextType, ClassLoader classLoader)` Creates extractor.

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

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

- - ### Constructor Detail

    - #### ScriptingExtractorFactory

          public ScriptingExtractorFactory()

  - ### Method Detail

    - #### createExtractor

          public <T,V,C> Extractor<T,V,C> createExtractor(String language,
                                                 String code,
                                                 String[] parameterNames,
                                                 Class<T>[] parameterTypes,
                                                 Class<V> valueType,
                                                 Class<C> contextType,
                                                 ClassLoader classLoader)

      Description copied from interface: `ExtractorFactory`
      Creates extractor.
      Specified by:
        `createExtractor` in interface `ExtractorFactory`
      Type Parameters:
        `T` - Source objects type.
        `V` - Value type.
      Parameters:
        `language` - Extractor language.
        `code` - Extractor code.
        `parameterTypes` - Extractor parameter types.
        `valueType` - Extractor value type. If this type is Boolean then the factory shall return Predicate.
        `classLoader` - Class loader to use for script evaluation.
      Returns:
        Extractor or null if this factory doesn't support given language.

    - #### createPredicate

          public <T,C> Predicate<T,C> createPredicate(String language,
                                             String code,
                                             String[] parameterNames,
                                             Class<T>[] parameterTypes,
                                             Class<C> contextType,
                                             ClassLoader classLoader)

      Description copied from interface: `ExtractorFactory`
      Creates extractor.
      Specified by:
        `createPredicate` in interface `ExtractorFactory`
      Type Parameters:
        `T` - Source objects type.
      Parameters:
        `language` - Extractor language.
        `code` - Extractor code.
        `parameterTypes` - Extractor parameter types.
        `classLoader` - Class loader to use for script evaluation.
      Returns:
        Extractor or null if this factory doesn't support given language.