org.eclipse.ocl.examples.pivot.context
Class EClassContext

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.context.AbstractParserContext
      extended by org.eclipse.ocl.examples.pivot.context.EClassContext
All Implemented Interfaces:
ParserContext
Direct Known Subclasses:
EInvocationContext

public class EClassContext
extends AbstractParserContext

EClassContext supports parsing OCL expressions in the context of an Ecore Class.


Field Summary
protected  org.eclipse.emf.ecore.EClassifier eClassContext
           
 
Fields inherited from class org.eclipse.ocl.examples.pivot.context.AbstractParserContext
metaModelManager, uri
 
Constructor Summary
EClassContext(MetaModelManager metaModelManager, org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.EClassifier eClassContext)
           
 
Method Summary
 Type getClassContext()
          Return the type of the self variable.
 void initialize(Base2PivotConversion conversion, ExpressionInOCL expression)
          Callback to initialize the ExpressionInOCL with the derived context such as a contextvariable for the self type, parameter and result variables.
 
Methods inherited from class org.eclipse.ocl.examples.pivot.context.AbstractParserContext
createBaseResource, getExpression, getMetaModelManager, parse, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eClassContext

@Nullable
protected final org.eclipse.emf.ecore.EClassifier eClassContext
Constructor Detail

EClassContext

public EClassContext(@NonNull
                     MetaModelManager metaModelManager,
                     @Nullable
                     org.eclipse.emf.common.util.URI uri,
                     @Nullable
                     org.eclipse.emf.ecore.EClassifier eClassContext)
Method Detail

getClassContext

@Nullable
public Type getClassContext()
Description copied from interface: ParserContext
Return the type of the self variable.

Specified by:
getClassContext in interface ParserContext
Overrides:
getClassContext in class AbstractParserContext

initialize

public void initialize(@NonNull
                       Base2PivotConversion conversion,
                       @NonNull
                       ExpressionInOCL expression)
Description copied from interface: ParserContext
Callback to initialize the ExpressionInOCL with the derived context such as a contextvariable for the self type, parameter and result variables.

Specified by:
initialize in interface ParserContext
Overrides:
initialize in class AbstractParserContext