|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.OCL<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject>
org.eclipse.ocl.ecore.OCL
public class OCL
Convenient subclass of the OCL façade that binds the
Ecore metamodel to the superclass's generic type parameters. This frees
client code from the long list of parameter substitutions. This subclass
also provides a shortcut to creating an OCL on the shared
EcoreEnvironmentFactory instance.
EcoreEnvironmentFactory| Nested Class Summary | |
|---|---|
static interface |
OCL.Helper
Convenient interface aliasing the type parameter substitutions for the Ecore environment, for ease of typing. |
static interface |
OCL.Query
Convenient interface aliasing the type parameter substitutions for the UML environment, for ease of typing. |
| Constructor Summary | |
|---|---|
protected |
OCL(Environment<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> env)
Initializes me with an initial environment for the Ecore metamodel. |
protected |
OCL(EnvironmentFactory<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> envFactory)
Initializes me with an environment factory for the Ecore metamodel. |
protected |
OCL(EnvironmentFactory<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> envFactory,
Resource resource)
Initializes me with an environment factory for the Ecore metamodel and a resource from which to load my root environment. |
| Method Summary | |
|---|---|
OCL.Helper |
createOCLHelper()
Creates a new OCLHelper instance for convenient parsing of
embedded constraints and query expressions in this environment.
The return type is narrowed to the Ecore binding for the generic
OCLHelper<C,O,P,CT> type. |
OCL.Query |
createQuery(Constraint constraint)
Creates a new Query encapsulating a constraint with the
current environment and extent map.
The return type is narrowed to the Ecore binding for the generic
Query<C,CLS,E> type. |
OCL.Query |
createQuery(OCLExpression<EClassifier> query)
Creates a new Query encapsulating a query expression with the
current environment and extent map.
The return type is narrowed to the Ecore binding for the generic
Query<C,CLS,E> type. |
static OCL |
newInstance()
Creates a new OCL using the shared Ecore environment
factory instance. |
static OCL |
newInstance(Environment<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> env)
Creates a new OCL using the specified initial Ecore
environment. |
static OCL |
newInstance(EnvironmentFactory<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> envFactory)
Creates a new OCL using the specified Ecore environment
factory. |
static OCL |
newInstance(EnvironmentFactory<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> envFactory,
Resource resource)
Creates a new OCL using the specified Ecore environment
factory and a resource from which to load the initial environment. |
| Methods inherited from class org.eclipse.ocl.OCL |
|---|
check, check, evaluate, getConstraints, getEnvironment, getEvaluationEnvironment, getExtentMap, isEvaluationTracingEnabled, isInvalid, isParseTracingEnabled, newInstance, newInstance, newInstance, parse, setEvaluationTracingEnabled, setExtentMap, setParseTracingEnabled, validate, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected OCL(EnvironmentFactory<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> envFactory)
envFactory - my environment factoryprotected OCL(Environment<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> env)
env - my root environment
protected OCL(EnvironmentFactory<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> envFactory,
Resource resource)
envFactory - my environment factoryresource - my persisted root environment| Method Detail |
|---|
public static OCL newInstance()
OCL using the shared Ecore environment
factory instance.
OCLpublic static OCL newInstance(EnvironmentFactory<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> envFactory)
OCL using the specified Ecore environment
factory.
envFactory - an environment factory for Ecore
OCLpublic static OCL newInstance(Environment<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> env)
OCL using the specified initial Ecore
environment.
env - an environment for Ecore
OCL
public static OCL newInstance(EnvironmentFactory<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> envFactory,
Resource resource)
OCL using the specified Ecore environment
factory and a resource from which to load the initial environment.
envFactory - an environment factory for Ecoreresource - the resource containing a persistent environment
(which may be empty for an initially empty environment)
OCLpublic OCL.Helper createOCLHelper()
OCLHelper instance for convenient parsing of
embedded constraints and query expressions in this environment. The
helper is particulary useful for parsing constraints embedded in the
model, in which case the context of a constraint is determined by its
placement and the textual context declarations are unnecessary.
The return type is narrowed to the Ecore binding for the generic OCLHelper<C,O,P,CT> type.
createOCLHelper in class OCL<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject>public OCL.Query createQuery(Constraint constraint)
Query encapsulating a constraint with the
current environment and extent map. This is convenient for repeated
evaluation of constraints and for filtering objects using
the constraint expression.
Every query maintains its own evaluation environment, which enables concurrent evaluation (where this may be safe in an EMF-based model) and different bindings for client-supplied "global" variables.
The return type is narrowed to the Ecore binding for the generic Query<C,CLS,E> type.
createQuery in class OCL<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject>constraint - the OCL constraint
OCL.createQuery(OCLExpression)public OCL.Query createQuery(OCLExpression<EClassifier> query)
Query encapsulating a query expression with the
current environment and extent map. This is convenient for repeated
evaluation of expressions and for filtering/transforming objects using
a query or constraint expression.
Every query maintains its own evaluation environment, which enables concurrent evaluation (where this may be safe in an EMF-based model) and different bindings for client-supplied "global" variables.
The return type is narrowed to the Ecore binding for the generic Query<C,CLS,E> type.
createQuery in class OCL<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject>query - the OCL query expression, which may be interpreted as a
constraint if it is boolean-valued
OCL.createQuery(Object)
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||