|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.AbstractEnvironmentFactory<org.eclipse.emf.ecore.EPackage,org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EEnumLiteral,org.eclipse.emf.ecore.EParameter,org.eclipse.emf.ecore.EObject,CallOperationAction,SendSignalAction,Constraint,org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject>
org.eclipse.ocl.ecore.EcoreEnvironmentFactory
org.eclipse.ocl.ecore.opposites.EcoreEnvironmentFactoryWithHiddenOpposites
public class EcoreEnvironmentFactoryWithHiddenOpposites
An environment factory which can be used to provide a non-null
OppositeEndFinder
to the OCL environment. This enables lookup and
evaluation of so-called "hidden opposites" which are represented by
annotations with key "Property.oppositeRoleName" on the forward reference
and which allow for querying the opposite direction by simple dotted syntax
and by cleanly providing a scope for the opposite lookup.
If no OppositeEndFinder
is provided to a constructor, a
DefaultOppositeEndFinder
is used that is either specific to the
registry
provided or that is aligned with the
default package registry
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.ocl.EnvironmentFactory |
---|
EnvironmentFactory.Lookup<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
Field Summary | |
---|---|
static EcoreEnvironmentFactoryWithHiddenOpposites |
INSTANCE
A default instance that works with the default package registry . |
Constructor Summary | |
---|---|
EcoreEnvironmentFactoryWithHiddenOpposites()
Initializes me. |
|
EcoreEnvironmentFactoryWithHiddenOpposites(org.eclipse.emf.ecore.EPackage.Registry reg)
Initializes me with an EPackage.Registry that the environments I create will use to look up
packages. |
|
EcoreEnvironmentFactoryWithHiddenOpposites(org.eclipse.emf.ecore.EPackage.Registry reg,
OppositeEndFinder oppositeEndFinder)
Configures both, a specific package registry as well as a dedicated opposite end finder to be used by the OCL environment created by this factory. |
Method Summary | |
---|---|
protected OppositeEndFinder |
createOppositeEndFinder(org.eclipse.emf.ecore.EPackage.Registry registry)
Returns a null opposite end finder. |
Methods inherited from class org.eclipse.ocl.ecore.EcoreEnvironmentFactory |
---|
createEnvironment, createEnvironment, createEvaluationEnvironment, createEvaluationEnvironment, createEvaluationVisitor, createOCLAnalyzer, createOCLAnalyzer, createOCLFactoryWithHistory, createOCLSyntaxHelper, createValidationVisitor, getClassifier, getEPackageRegistry, getOppositeEndFinder, loadEnvironment, lookupPackage |
Methods inherited from class org.eclipse.ocl.AbstractEnvironmentFactory |
---|
createAttributeContext, createClassifierContext, createInstanceContext, createOperationContext, createPackageContext, createPackageContext, getAdapter, isEvaluationTracingEnabled, setEvaluationTracingEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final EcoreEnvironmentFactoryWithHiddenOpposites INSTANCE
package registry
.
Constructor Detail |
---|
public EcoreEnvironmentFactoryWithHiddenOpposites()
DefaultOppositeEndFinder.getInstance()
as opposite end finder.
public EcoreEnvironmentFactoryWithHiddenOpposites(org.eclipse.emf.ecore.EPackage.Registry reg)
EPackage.Registry
that the environments I create will use to look up
packages. A new DefaultOppositeEndFinder
object is created for the specific package registry
provided as reg
.
reg
- my package registry (must not be null
)public EcoreEnvironmentFactoryWithHiddenOpposites(org.eclipse.emf.ecore.EPackage.Registry reg, OppositeEndFinder oppositeEndFinder)
Method Detail |
---|
protected OppositeEndFinder createOppositeEndFinder(org.eclipse.emf.ecore.EPackage.Registry registry)
EcoreEnvironmentFactory
null
opposite end finder. This means that by default no hidden opposites
will be found and no CPU cycles will be used even for looking them up.
Subclasses can redefine this accordingly. See, e.g., EcoreEnvironmentFactoryWithHiddenOpposites
.
createOppositeEndFinder
in class EcoreEnvironmentFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |