|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.validator.constraints.impl.scriptassert.ScriptEvaluator
public class ScriptEvaluator
A wrapper around JSR 223 ScriptEngines. This class is thread-safe.
| Constructor Summary | |
|---|---|
ScriptEvaluator(javax.script.ScriptEngine engine)
Creates a new script executor. |
|
| Method Summary | |
|---|---|
boolean |
evaluate(java.lang.String script,
java.lang.Object obj,
java.lang.String objectAlias)
Makes the given object available in then engine-scoped script context and executes the given script. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptEvaluator(javax.script.ScriptEngine engine)
engine - The engine to be wrapped.| Method Detail |
|---|
public boolean evaluate(java.lang.String script,
java.lang.Object obj,
java.lang.String objectAlias)
script - The script to be executed.obj - The object to be put into the context.objectAlias - The name under which the given object shall be put into the context.
javax.validation.ConstraintDeclarationException - In case of any errors during script execution or if the script
returned null or another type than Boolean.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||