public class EcoreEnvironmentFactoryWithHiddenOpposites extends EcoreEnvironmentFactory
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
.
Modifier and Type | Field and Description |
---|---|
static EcoreEnvironmentFactoryWithHiddenOpposites |
INSTANCE
A default instance that works with the default
package registry . |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected OppositeEndFinder |
createOppositeEndFinder(org.eclipse.emf.ecore.EPackage.Registry registry)
Returns a
null opposite end finder. |
createEnvironment, createEnvironment, createEvaluationEnvironment, createEvaluationEnvironment, createEvaluationVisitor, createOCLAnalyzer, createOCLAnalyzer, createOCLFactoryWithHistory, createOCLSyntaxHelper, createValidationVisitor, getClassifier, getEPackageRegistry, getOppositeEndFinder, loadEnvironment, lookupPackage
createAttributeContext, createClassifierContext, createInstanceContext, createOperationContext, createPackageContext, createPackageContext, getAdapter, isEvaluationTracingEnabled, setEvaluationTracingEnabled
public static final EcoreEnvironmentFactoryWithHiddenOpposites INSTANCE
package registry
.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)
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