Package com.googlecode.aviator.runtime
Class RuntimeUtils
java.lang.Object
com.googlecode.aviator.runtime.RuntimeUtils
Runtime utils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final AviatorObjectassertNotNull(AviatorObject object) Ensure the object is not null, cast null into AviatorNil.static voidstatic final longgetEvalTimeoutNs(Map<String, Object> env) static AviatorFunctiongetFunction(Object object, Map<String, Object> env) static AviatorFunctiongetFunction(Map<String, Object> env, String name) static final AviatorEvaluatorInstancegetInstance(Map<String, Object> env) Get the current evaluator instance,returns the global instance if not found.static final MathContextgetMathContext(Map<String, Object> env) static final booleanisTracedEval(Map<String, Object> env) static final voidprintlnTrace(Map<String, Object> env, String msg) static voidprintStackTrace(Map<String, Object> env, Exception e) static voidstatic SequenceCast an object into sequence if possible, otherwise throw an exception.static final AviatorFunctionWrap the function to unpacking-arguments function.
-
Field Details
-
CHECKPOINTS
private static final int CHECKPOINTS
-
-
Constructor Details
-
RuntimeUtils
private RuntimeUtils()
-
-
Method Details
-
getInstance
Get the current evaluator instance,returns the global instance if not found.- Returns:
-
unpackArgsFunction
Wrap the function to unpacking-arguments function.- Parameters:
fn-- Returns:
-
resetLambdaContext
-
seq
Cast an object into sequence if possible, otherwise throw an exception.- Parameters:
o-- Returns:
-
checkExecutionTimedOut
-
assertNotNull
Ensure the object is not null, cast null into AviatorNil.- Parameters:
object-- Returns:
-
getMathContext
-
printlnTrace
-
isTracedEval
-
getEvalTimeoutNs
-
getFunction
-
getFunction
-
printStackTrace
-