public enum Options extends Enum<Options>
| Modifier and Type | Class and Description |
|---|---|
static class |
Options.Value
The option's value union
|
| Enum Constant and Description |
|---|
ALLOWED_CLASS_SET
Allowed java class set in new statement and class's static method(fields) etc.
|
ALWAYS_PARSE_FLOATING_POINT_NUMBER_INTO_DECIMAL
When true, always parsing floating-point number into BigDecial, default is false.It replaces
#ALWAYS_USE_DOUBLE_AS_DECIMAL option. |
ALWAYS_PARSE_INTEGRAL_NUMBER_INTO_DECIMAL
When true, always parsing integral number into BigDecial, default is false.
|
ASSIGNABLE_ALLOWED_CLASS_SET
Allowed assignable java class set in new statement and class's static method(fields) etc.
|
CAPTURE_FUNCTION_ARGS
Whether to capture the function arguments(at invocation) into env, the argument list will be
stored in __args__ variable in env valid for function body.
|
ENABLE_PROPERTY_SYNTAX_SUGAR
Enable property access syntax sugar, use common-beantuils to access property such as "a.b.c"
etc.
|
EVAL_MODE
Script engine evaluate mode, default is ASM mode.
|
FEATURE_SET
AviatorScript engine feature set, see
Feature |
MATH_CONTEXT
Math context for decimal, default is
MathContext.DECIMAL128 |
MAX_LOOP_COUNT
Max loop count to prevent too much CPU consumption.
|
NIL_WHEN_PROPERTY_NOT_FOUND
When enable property access syntax sugar, returns nil if the property value is not found or
throws exception.Default value is false,disabled this behaviour.
|
OPTIMIZE_LEVEL
Optimize level, default is
AviatorEvaluator.EVAL |
PUT_CAPTURING_GROUPS_INTO_ENV
Whether to put capturing groups into passed-in env map when regular-expression pattern matches,
default is true.If you don't want the groups, you can turn it off to get better performance in
regular-expression pattern matching.
|
TRACE_EVAL
Whether to trace expression evaluating procedure, default is false.
|
USE_USER_ENV_AS_TOP_ENV_DIRECTLY
Whether to use user passed-in env as top level environment directly.If true, it may make side
effects(such as assignment) to user passed-in env., otherwise aviator will wrap the user
passed-in env and does not make any side effects into it.
|
| Modifier and Type | Field and Description |
|---|---|
static Options.Value |
ASM_MODE |
static Options.Value |
COMPILE_VALUE |
static Options.Value |
DEFAULT_MATH_CONTEXT |
static Options.Value |
EVAL_VALUE |
static Options.Value |
FALSE_VALUE |
static Options.Value |
INTERPRETER_MODE |
static Options.Value |
NULL_CLASS_SET |
static Options.Value |
SYS_EVAL_MODE |
static Options.Value |
TRUE_VALUE |
static Options.Value |
ZERO_VALUE |
| Modifier and Type | Method and Description |
|---|---|
static Options.Value |
getDefaultEvalMode() |
Object |
getDefaultValue()
Returns the default value of option.
|
Options.Value |
getDefaultValueObject()
Returns the default value object of option.
|
Object |
intoObject(Options.Value val)
Cast value union into java object.
|
Options.Value |
intoValue(Object val)
Cast java object into value union.
|
boolean |
isValidValue(Object val) |
static Options |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Options[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Options OPTIMIZE_LEVEL
AviatorEvaluator.EVALAviatorEvaluator.EVAL,
AviatorEvaluator.COMPILEpublic static final Options MATH_CONTEXT
MathContext.DECIMAL128MathContextpublic static final Options ALWAYS_PARSE_FLOATING_POINT_NUMBER_INTO_DECIMAL
#ALWAYS_USE_DOUBLE_AS_DECIMAL option.public static final Options ALWAYS_PARSE_INTEGRAL_NUMBER_INTO_DECIMAL
public static final Options TRACE_EVAL
public static final Options PUT_CAPTURING_GROUPS_INTO_ENV
public static final Options CAPTURE_FUNCTION_ARGS
public static final Options ENABLE_PROPERTY_SYNTAX_SUGAR
public static final Options NIL_WHEN_PROPERTY_NOT_FOUND
public static final Options USE_USER_ENV_AS_TOP_ENV_DIRECTLY
public static final Options MAX_LOOP_COUNT
public static final Options FEATURE_SET
Featurepublic static final Options ALLOWED_CLASS_SET
public static final Options ASSIGNABLE_ALLOWED_CLASS_SET
public static final Options EVAL_MODE
public static final Options.Value FALSE_VALUE
public static final Options.Value TRUE_VALUE
public static final Options.Value ZERO_VALUE
public static final Options.Value DEFAULT_MATH_CONTEXT
public static final Options.Value EVAL_VALUE
public static final Options.Value COMPILE_VALUE
public static final Options.Value ASM_MODE
public static final Options.Value INTERPRETER_MODE
public static final Options.Value NULL_CLASS_SET
public static Options.Value SYS_EVAL_MODE
public static Options[] values()
for (Options c : Options.values()) System.out.println(c);
public static Options valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Object intoObject(Options.Value val)
val - public Options.Value intoValue(Object val)
val - public boolean isValidValue(Object val)
public Object getDefaultValue()
public Options.Value getDefaultValueObject()
public static Options.Value getDefaultEvalMode()
Copyright © 2010–2022. All rights reserved.