org.eclipse.ocl.options
Class EvaluationOptions

java.lang.Object
  extended by org.eclipse.ocl.options.EvaluationOptions

public class EvaluationOptions
extends Object

Options applicable to EvaluationEnvironments to customize their evaluation behaviour.

Since:
1.2

Field Summary
static Option<Boolean> LAX_NULL_HANDLING
           Evaluation option indicating whether to implement lax handling of null values in certain OclAny-defined operations.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAX_NULL_HANDLING

public static final Option<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 false for any OCL type instead of returning Oclinvalid. 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.

Since:
1.2
Method Detail

setOption

public 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.

Parameters:
env - an evaluation environment on which to set an option
option - the option
value - the option's value
See Also:
Cusotmizable#setOption(Option, Object)

getValue

public 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. If not already set, return the option's default value.

Parameters:
env - an evaluation environment on which to query an option
option - an option to query
Returns:
value of the option
See Also:
Customizable.getValue(Option)

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.