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 |
|---|
ALWAYS_PARSE_FLOATING_POINT_NUMBER_INTO_DECIMAL
Always parsing floating-point number into BigDecial, default is false.It replaces
ALWAYS_USE_DOUBLE_AS_DECIMAL option. |
ALWAYS_USE_DOUBLE_AS_DECIMAL
Deprecated.
This is a name typo option, please use
#ALWAYS_USE_DECIMAL_AS_FLOATING_POINT_NUMBER instead. |
ENABLE_PROPERTY_SYNTAX_SUGAR
Enable property access syntax sugar, use common-beantuils to access property such as "a.b.c"
etc.
|
MATH_CONTEXT
Math context for decimal, default is
MathContext.DECIMAL128 |
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
Deprecated.
|
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 |
COMPILE_VALUE |
static Options.Value |
DEFAULT_MATH_CONTEXT |
static Options.Value |
EVAL_VALUE |
static Options.Value |
FALSE_VALUE |
static Options.Value |
TRUE_VALUE |
| Modifier and Type | Method and Description |
|---|---|
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 ALWAYS_USE_DOUBLE_AS_DECIMAL
#ALWAYS_USE_DECIMAL_AS_FLOATING_POINT_NUMBER instead.public static final Options OPTIMIZE_LEVEL
AviatorEvaluator.EVALpublic static final Options MATH_CONTEXT
MathContext.DECIMAL128MathContextpublic static final Options TRACE
public static final Options ALWAYS_PARSE_FLOATING_POINT_NUMBER_INTO_DECIMAL
ALWAYS_USE_DOUBLE_AS_DECIMAL option.public static final Options TRACE_EVAL
public static final Options PUT_CAPTURING_GROUPS_INTO_ENV
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.Value FALSE_VALUE
public static final Options.Value TRUE_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 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()
Copyright © 2019. All rights reserved.