org.hibernate.validator.internal.util.scriptengine

## Class ScriptEvaluatorFactory

- java.lang.Object
- - org.hibernate.validator.internal.util.scriptengine.ScriptEvaluatorFactory

-     public class ScriptEvaluatorFactory
      extends Object

  Factory responsible for the creation of `ScriptEvaluator`s. This class is thread-safe.
  Author:
    Gunnar Morling, Kevin Pollet (C) 2011 SERLI

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ScriptEvaluatorFactory` | `getInstance()` Retrieves an instance of this factory.
    `ScriptEvaluator` | `getScriptEvaluatorByLanguageName(String languageName)` Retrieves a script executor for the given language.

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

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

- - ### Method Detail

    - #### getInstance

          public static ScriptEvaluatorFactory getInstance()

      Retrieves an instance of this factory.
      Returns:
        A script evaluator factory. Never null.

    - #### getScriptEvaluatorByLanguageName

          public ScriptEvaluator getScriptEvaluatorByLanguageName(String languageName)
                                                           throws ScriptException

      Retrieves a script executor for the given language.
      Parameters:
        `languageName` - The name of a scripting language as expected by `ScriptEngineManager.getEngineByName(String)`.
      Returns:
        A script executor for the given language. Never null.
      Throws:
        `ScriptException` - In case no JSR 223 compatible engine for the given language could be found.

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved