org.eclipse.emf.ocl.parser
Class EcoreEnvironmentFactory

java.lang.Object
  extended byorg.eclipse.emf.ocl.parser.AbstractEnvironmentFactory
      extended byorg.eclipse.emf.ocl.parser.EcoreEnvironmentFactory
All Implemented Interfaces:
EnvironmentFactory

public class EcoreEnvironmentFactory
extends AbstractEnvironmentFactory

Environment factory for the Ecore metamodel.


Field Summary
 
Fields inherited from interface org.eclipse.emf.ocl.parser.EnvironmentFactory
ECORE_INSTANCE
 
Constructor Summary
protected EcoreEnvironmentFactory()
          Initializes me.
  EcoreEnvironmentFactory(org.eclipse.emf.ecore.EPackage.Registry reg)
          Initializes me with an EPackage.Registry
 
Method Summary
protected  org.eclipse.emf.ecore.EClassifier asEClassifier(java.lang.Object context)
          Adapts the specified client metamodel context to the EClassifier API.
protected  org.eclipse.emf.ecore.EOperation asEOperation(java.lang.Object operation)
          Adapts the specified client metamodel operation to the EOperation API.
protected  org.eclipse.emf.ecore.EStructuralFeature asEStructuralFeature(java.lang.Object property)
          Adapts the specified client metamodel property to the EStructuralFeature API.
 Environment createEnvironment(Environment parent)
          Creates a child environment of a specified parent, for definition of nested scopes.
protected  Environment createEnvironment(org.eclipse.emf.ecore.EPackage packageContext)
          Creates an environment for OCL constraints in the context of the specified classifier.
 Environment createPackageContext(java.util.List pathname)
          Creates an environment suitable for parsing OCL expressions in the specified package context.
 
Methods inherited from class org.eclipse.emf.ocl.parser.AbstractEnvironmentFactory
createClassifierContext, createEvaluationEnvironment, createExtentMap, createOperationContext, createPropertyContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EcoreEnvironmentFactory

protected EcoreEnvironmentFactory()
Initializes me.


EcoreEnvironmentFactory

public EcoreEnvironmentFactory(org.eclipse.emf.ecore.EPackage.Registry reg)
Initializes me with an EPackage.Registry

Method Detail

createPackageContext

public Environment createPackageContext(java.util.List pathname)
Description copied from interface: EnvironmentFactory
Creates an environment suitable for parsing OCL expressions in the specified package context. This context will become a classifier context when the "self" variable is defined.

Specified by:
createPackageContext in interface EnvironmentFactory
Overrides:
createPackageContext in class AbstractEnvironmentFactory

asEClassifier

protected org.eclipse.emf.ecore.EClassifier asEClassifier(java.lang.Object context)
Description copied from class: AbstractEnvironmentFactory
Adapts the specified client metamodel context to the EClassifier API. This might just return the context if it already is an EClassifier, or might return its type if it is an instance of an EClassifier, or adapt it by some other means to the EClassifier API.

Specified by:
asEClassifier in class AbstractEnvironmentFactory
Parameters:
context - a classifier in the client metamodel's definition of what an OCL classifier is, or an instance thereof
Returns:
the Ecore representation of the client's classifier

asEOperation

protected org.eclipse.emf.ecore.EOperation asEOperation(java.lang.Object operation)
Description copied from class: AbstractEnvironmentFactory
Adapts the specified client metamodel operation to the EOperation API.

Specified by:
asEOperation in class AbstractEnvironmentFactory
Parameters:
operation - an operation in the client metamodel's definition of what an OCL operation is
Returns:
the Ecore representation of the client's operation

asEStructuralFeature

protected org.eclipse.emf.ecore.EStructuralFeature asEStructuralFeature(java.lang.Object property)
Description copied from class: AbstractEnvironmentFactory
Adapts the specified client metamodel property to the EStructuralFeature API.

Specified by:
asEStructuralFeature in class AbstractEnvironmentFactory
Parameters:
property - a property in the client metamodel's definition of what an OCL property is
Returns:
the Ecore representation of the client's property

createEnvironment

protected Environment createEnvironment(org.eclipse.emf.ecore.EPackage packageContext)
Creates an environment for OCL constraints in the context of the specified classifier.

Specified by:
createEnvironment in class AbstractEnvironmentFactory
Parameters:
packageContext - the OCL package context (not null)
Returns:
the OCL environment

createEnvironment

public Environment createEnvironment(Environment parent)
Description copied from interface: EnvironmentFactory
Creates a child environment of a specified parent, for definition of nested scopes.

Parameters:
parent - the parent environment
Returns:
the child environment

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