Class GraalJsEvaluator<T>
java.lang.Object
io.nosqlbench.engine.api.scripting.GraalJsEvaluator<T>
- All Implemented Interfaces:
ExprEvaluator<T>
public class GraalJsEvaluator<T> extends java.lang.Object implements ExprEvaluator<T>
-
Constructor Summary
Constructors Constructor Description GraalJsEvaluator(java.lang.Class<T> resultType) -
Method Summary
Modifier and Type Method Description Teval()Evaluate the provided script, returning the value that it yieldsExprEvaluator<T>put(java.lang.String varName, java.lang.Object var)Set the variable environment of the evaluatorExprEvaluator<T>script(java.lang.String scriptText)
-
Constructor Details
-
Method Details
-
eval
Description copied from interface:ExprEvaluatorEvaluate the provided script, returning the value that it yields- Specified by:
evalin interfaceExprEvaluator<T>- Returns:
- An object of type T
-
script
- Specified by:
scriptin interfaceExprEvaluator<T>- Parameters:
scriptText- script text- Returns:
- this ExprEvaluator
, for method chaining
-
put
Description copied from interface:ExprEvaluatorSet the variable environment of the evaluator- Specified by:
putin interfaceExprEvaluator<T>- Parameters:
varName- the variable name to add to the environmentvar- the object to bind to the varname- Returns:
- this ExprEvaluator
, for method chaining
-