Class OperationRuntime
java.lang.Object
com.googlecode.aviator.runtime.op.OperationRuntime
Operation runtime
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ThreadLocal
<AviatorObject[]> private static final String
private static final ThreadLocal
<AviatorObject[]> private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsOpFunction
(Map<String, Object> env, OperatorType opType) private static String
desc
(AviatorObject arg, Map<String, Object> env) static AviatorObject
eval
(AviatorObject left, AviatorObject right, Map<String, Object> env, OperatorType opType) Eval with binary operatorstatic AviatorObject
eval
(AviatorObject arg, Map<String, Object> env, OperatorType opType) Eval with unary operatorstatic AviatorObject
eval
(AviatorObject left, Map<String, Object> env, AviatorObject right, OperatorType opType) Just likeeval(AviatorObject, AviatorObject, Map, OperatorType)
, but with difference arguments order.static AviatorObject
eval
(Map<String, Object> env, AviatorObject[] args, OperatorType opType) Eval with arguments array.private static AviatorObject
eval0
(AviatorObject left, AviatorObject right, Map<String, Object> env, OperatorType opType, AviatorFunction func) private static AviatorObject
eval0
(AviatorObject arg, Map<String, Object> env, OperatorType opType, AviatorFunction func) private static AviatorObject
eval0
(Map<String, Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func) static AviatorObject
evalOpFunction
(Map<String, Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func) static final boolean
hasRuntimeContext
(Map<String, Object> env, OperatorType opType) private static void
trace
(Map<String, Object> env, OperatorType opType, AviatorObject result, AviatorObject... args)
-
Field Details
-
TWO_ARRGS
-
ONE_ARG
-
WHITE_SPACE
- See Also:
-
TRACE_PREFIX
- See Also:
-
-
Constructor Details
-
OperationRuntime
public OperationRuntime()
-
-
Method Details
-
eval
Eval with arguments array.- Parameters:
args
-opType
-- Returns:
-
eval0
private static AviatorObject eval0(Map<String, Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func) -
evalOpFunction
public static AviatorObject evalOpFunction(Map<String, Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func) -
eval
Eval with unary operator- Parameters:
arg
-env
-opType
-- Returns:
-
eval0
private static AviatorObject eval0(AviatorObject arg, Map<String, Object> env, OperatorType opType, AviatorFunction func) -
eval
public static AviatorObject eval(AviatorObject left, Map<String, Object> env, AviatorObject right, OperatorType opType) Just likeeval(AviatorObject, AviatorObject, Map, OperatorType)
, but with difference arguments order.- Parameters:
left
-env
-right
-opType
-- Returns:
-
eval
public static AviatorObject eval(AviatorObject left, AviatorObject right, Map<String, Object> env, OperatorType opType) Eval with binary operator- Parameters:
left
-right
-env
-opType
-- Returns:
-
eval0
private static AviatorObject eval0(AviatorObject left, AviatorObject right, Map<String, Object> env, OperatorType opType, AviatorFunction func) -
hasRuntimeContext
-
containsOpFunction
-
desc
-
trace
private static void trace(Map<String, Object> env, OperatorType opType, AviatorObject result, AviatorObject... args)
-