public class EvaluationOptions
extends java.lang.Object
EvaluationEnvironment
s to
customize their evaluation behaviour.Modifier and Type | Field and Description |
---|---|
static Option<java.lang.Boolean> |
LAX_NULL_HANDLING
Evaluation option indicating whether to implement lax handling of null
values in certain OclAny-defined operations.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
getValue(EvaluationEnvironment env,
Option<T> option)
Obtains the value of the specified option's setting in the the given
environment's options map, adapting the environment as necessary to the
Customizable API. |
static <T> void |
setOption(EvaluationEnvironment env,
Option<T> option,
T value)
Add an option to apply to the specified environment, adapting it as
necessary to the
Customizable API. |
@NonNull public static final Option<java.lang.Boolean> LAX_NULL_HANDLING
Evaluation option indicating whether to implement lax handling of null values in certain OclAny-defined operations. When true, the null.oclIsKindOf(OclType) and null.oclIsTypeOf(OclType) operations will return true for any OCL type instead of returning OclInvalid, as OclVoid is defined as conforming to all other types. Similarly, null.oclAsType(OclType) will return null for any OCL type instead of OclInvalid as prescribed by the OCL 2.0 Specification.
For backward compatibility with the 1.1 release behaviour, the default value of this option is true. For strict conformance to the specification, use false.
public static <T> void setOption(@NonNull EvaluationEnvironment env, @NonNull Option<T> option, @Nullable T value)
Customizable
API.env
- an evaluation environment on which to set an optionoption
- the optionvalue
- the option's valueCusotmizable#setOption(Option, Object)
@Nullable public static <T> T getValue(@NonNull EvaluationEnvironment env, @NonNull Option<T> option)
Customizable
API. If not already set, return the option's
default value.env
- an evaluation environment on which to query an optionoption
- an option to queryCustomizable.getValue(Option)