public final class RuntimeUtils extends Object
Modifier and Type | Method and Description |
---|---|
static AviatorObject |
assertNotNull(AviatorObject object)
Ensure the object is not null, cast null into AviatorNil.
|
static AviatorFunction |
getFunction(Map<String,Object> env,
String name) |
static AviatorFunction |
getFunction(Object object,
Map<String,Object> env) |
static AviatorEvaluatorInstance |
getInstance(Map<String,Object> env)
Get the current evaluator instance,returns the global instance if not found.
|
static MathContext |
getMathContext(Map<String,Object> env) |
static boolean |
isTracedEval(Map<String,Object> env) |
static void |
printlnTrace(Map<String,Object> env,
String msg) |
static void |
printStackTrace(Map<String,Object> env,
Exception e) |
static Sequence |
seq(Object o,
Map<String,Object> env)
Cast an object into sequence if possible, otherwise throw an exception.
|
static AviatorFunction |
unpackArgsFunction(AviatorFunction fn)
Wrap the function to unpacking-arguments function.
|
public static final AviatorEvaluatorInstance getInstance(Map<String,Object> env)
public static final AviatorFunction unpackArgsFunction(AviatorFunction fn)
fn
- public static Sequence seq(Object o, Map<String,Object> env)
o
- public static final AviatorObject assertNotNull(AviatorObject object)
object
- public static final MathContext getMathContext(Map<String,Object> env)
public static AviatorFunction getFunction(Object object, Map<String,Object> env)
public static AviatorFunction getFunction(Map<String,Object> env, String name)
Copyright © 2010–2021. All rights reserved.