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 AviatorObject
assertNotNull
(AviatorObject object) Ensure the object is not null, cast null into AviatorNil.static void
static final long
getEvalTimeoutNs
(Map<String, Object> env) static AviatorFunction
getFunction
(Object object, Map<String, Object> env) static AviatorFunction
getFunction
(Map<String, Object> env, String name) static final AviatorEvaluatorInstance
getInstance
(Map<String, Object> env) Get the current evaluator instance,returns the global instance if not found.static final MathContext
getMathContext
(Map<String, Object> env) static final boolean
isTracedEval
(Map<String, Object> env) static final void
printlnTrace
(Map<String, Object> env, String msg) static void
printStackTrace
(Map<String, Object> env, Exception e) static void
static Sequence
Cast an object into sequence if possible, otherwise throw an exception.static final AviatorFunction
Wrap 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
-