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

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.context.AbstractParserContext
      extended by org.eclipse.ocl.examples.pivot.context.ClassContext
All Implemented Interfaces:
ParserContext
Direct Known Subclasses:
DiagnosticContext, OperationContext, PropertyContext

public class ClassContext
extends AbstractParserContext

ClassContext supports parsing OCL expressions in the context of a Class.


Field Summary
protected  Type classContext
           
 
Fields inherited from class org.eclipse.ocl.examples.pivot.context.AbstractParserContext
metaModelManager, uri
 
Constructor Summary
ClassContext(MetaModelManager metaModelManager, org.eclipse.emf.common.util.URI uri, Type classContext)
           
 
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, getURI, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classContext

protected final Type classContext
Constructor Detail

ClassContext

public ClassContext(MetaModelManager metaModelManager,
                    org.eclipse.emf.common.util.URI uri,
                    Type classContext)
Method Detail

getClassContext

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(Base2PivotConversion conversion,
                       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