Class DefaultScriptEvaluatorFactory
java.lang.Object
org.hibernate.validator.spi.scripting.AbstractCachingScriptEvaluatorFactory
org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory
- All Implemented Interfaces:
ScriptEvaluatorFactory
Factory responsible for the creation of JSR 223 based
ScriptEngineScriptEvaluator
s. This
class is thread-safe.- Author:
- Gunnar Morling, Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI, Marko Bekhta, Guillaume Smet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the state of the factory.protected ScriptEvaluator
createNewScriptEvaluator
(String languageName) Creates a new script evaluator for the given language.Methods inherited from class org.hibernate.validator.spi.scripting.AbstractCachingScriptEvaluatorFactory
getScriptEvaluatorByLanguageName
-
Constructor Details
-
DefaultScriptEvaluatorFactory
-
-
Method Details
-
clear
public void clear()Description copied from interface:ScriptEvaluatorFactory
Clear the state of the factory.Called when the
ValidatorFactory
is closed.- Specified by:
clear
in interfaceScriptEvaluatorFactory
- Overrides:
clear
in classAbstractCachingScriptEvaluatorFactory
-
createNewScriptEvaluator
protected ScriptEvaluator createNewScriptEvaluator(String languageName) throws ScriptEvaluationException Description copied from class:AbstractCachingScriptEvaluatorFactory
Creates a new script evaluator for the given language.- Specified by:
createNewScriptEvaluator
in classAbstractCachingScriptEvaluatorFactory
- Parameters:
languageName
- the name of a scripting language- Returns:
- a newly created script evaluator for the given language
- Throws:
ScriptEvaluationException
-