com.ibm.xtools.emf.query.ocl.conditions
Class OclConstraintCondition
java.lang.Object
com.ibm.xtools.emf.query.conditions.Condition
com.ibm.xtools.emf.query.conditions.eobjects.EObjectCondition
com.ibm.xtools.emf.query.ocl.conditions.OclCondition
com.ibm.xtools.emf.query.ocl.conditions.OclConstraintCondition
- public class OclConstraintCondition
- extends OclCondition
A subclass of OCL condition class that is used to apply boolean based OCL
expression on EObjects.
Constructor Summary |
OclConstraintCondition(String oclExpressionString,
org.eclipse.emf.ecore.EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter)
A constructor that takes an OCL expression string, an EClass
representing the EObject type which the OCL expression
uses as a context, an IEStructuralFeatureValueGetter to
use to get values of EStructuralFeature referenced by the
OCL expression. |
OclConstraintCondition(String oclExpressionString,
org.eclipse.emf.ecore.EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter,
PruneHandler pruneHandler)
A constructor that takes an OCL expression string, an EClass
representing the EObject type which the OCL expression
uses as a context, an IEStructuralFeatureValueGetter to
use to get values of EStructuralFeature referenced by the
OCL expression and a PruneHandler to consult for pruning.
|
Method Summary |
boolean |
isSatisfied(org.eclipse.emf.ecore.EObject eObject)
Returns the boolean value as a result of evaluating the ocl expression on
the argument eObject. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_CONDITION
public static final OclConstraintCondition NULL_CONDITION
- A simple constant class that represents a null
OclConstraintCondition
which basically is always
satisfied.
OclConstraintCondition
public OclConstraintCondition(String oclExpressionString,
org.eclipse.emf.ecore.EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter)
- A constructor that takes an OCL expression string, an
EClass
representing the EObject
type which the OCL expression
uses as a context, an IEStructuralFeatureValueGetter
to
use to get values of EStructuralFeature
referenced by the
OCL expression. It defaults to using PruneHandler.NEVER to consult for
pruning.
NOTE: if contextEObjectType is null
, then this becomes a
context-free ocl-condition
- Parameters:
oclExpressionString
- The OCL expression to apply when evaluating this
OclConstraintCondition
contextEObjectType
- The EClass
representing the type of the
EObject
being evaluated by this
OclConstraintCondition
. If it is
null
, then this becomes a context-free
OclConstraintCondition
.eStructuralFeatureValueGetter
- The IEStructuralFeatureValueGetter
to be used
by this OclConstraintCondition
to extract the
value of the EStructuralFeatures of interest. It serves as a
layer of indirection to allow clients to intervene between
this condition object and the way it extracts the
EStructuralFeatures' values so as to allow for possible
messaging of such values before subjecting them to evaluation
by the OCL interpreter.
OclConstraintCondition
public OclConstraintCondition(String oclExpressionString,
org.eclipse.emf.ecore.EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter,
PruneHandler pruneHandler)
- A constructor that takes an OCL expression string, an
EClass
representing the EObject
type which the OCL expression
uses as a context, an IEStructuralFeatureValueGetter
to
use to get values of EStructuralFeature
referenced by the
OCL expression and a PruneHandler
to consult for pruning.
NOTE: if contextEObjectType is null
, then this becomes a
context-free ocl-condition
- Parameters:
oclExpressionString
- The OCL expression to apply when evaluating this
OclConstraintCondition
contextEObjectType
- The EClass
representing the type of the
EObject
being evaluated by this
OclConstraintCondition
. If it is
null
, then this becomes a context-free
OclConstraintCondition
.eStructuralFeatureValueGetter
- The IEStructuralFeatureValueGetter
to be used
by this OclConstraintCondition
to extract the
value of the EStructuralFeatures of interest. It serves as a
layer of indirection to allow clients to intervene between
this condition object and the way it extracts the
EStructuralFeatures' values so as to allow for possible
messaging of such values before subjecting them to evaluation
by the OCL interpreter.pruneHandler
- The PruneHandler
to consult when pruning
isSatisfied
public boolean isSatisfied(org.eclipse.emf.ecore.EObject eObject)
- Returns the boolean value as a result of evaluating the ocl expression on
the argument eObject.
- Overrides:
isSatisfied
in class OclCondition
- See Also:
EObjectCondition.isSatisfied(org.eclipse.emf.ecore.EObject)
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.