org.eclipse.ocl.examples.impactanalyzer.instanceScope
Class OperationCallExpTracer

java.lang.Object
  extended by org.eclipse.ocl.examples.impactanalyzer.instanceScope.AbstractTracer<OperationCallExp>
      extended by org.eclipse.ocl.examples.impactanalyzer.instanceScope.OperationCallExpTracer
All Implemented Interfaces:
Tracer

public class OperationCallExpTracer
extends AbstractTracer<OperationCallExp>


Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.impactanalyzer.instanceScope.AbstractTracer
oclFactory
 
Constructor Summary
OperationCallExpTracer(OperationCallExp expression, java.util.Stack<java.lang.String> tuplePartNames, OCLFactory oclFactory)
           
 
Method Summary
protected  java.util.Set<Variable> calculateEnteringScope(OperationBodyToCallMapper operationBodyToCallMapper)
          Calculates the scopes the NavigationStep this Tracer creates will enter when navigated.
protected  java.util.Set<Variable> calculateLeavingScopes(OperationBodyToCallMapper operationBodyToCallMapper)
          When tracing into the called operation's body, all variables currently in scope are left.
 NavigationStep traceback(org.eclipse.emf.ecore.EClass context, PathCache pathCache, OperationBodyToCallMapper operationBodyToCallMapper)
          By default, many expression types which, e.g., result in a primitive result, return an EmptyResultNavigationStep which is what this default implementation does.
 
Methods inherited from class org.eclipse.ocl.examples.impactanalyzer.instanceScope.AbstractTracer
applyScopesOnNavigationStep, commonCompositionParent, commonCompositionParent, doesTypeMatch, doesTypeMatch, getAllVariablesInScope, getExpression, getExtendedListOfTuplePartNames, getInnermostElementType, getListOfTuplePartNamesWithFoundRemoved, getRootExpression, getTupleLiteralPartNamesToLookFor, getTuplePartNameLookedFor, getVariablesIntroducedBetweenHereAnd, getVariablesScopedByExpression, isLookingForTuplePart, variablesIntroducedBetween
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationCallExpTracer

public OperationCallExpTracer(OperationCallExp expression,
                              java.util.Stack<java.lang.String> tuplePartNames,
                              OCLFactory oclFactory)
Method Detail

traceback

public NavigationStep traceback(org.eclipse.emf.ecore.EClass context,
                                PathCache pathCache,
                                OperationBodyToCallMapper operationBodyToCallMapper)
Description copied from class: AbstractTracer
By default, many expression types which, e.g., result in a primitive result, return an EmptyResultNavigationStep which is what this default implementation does.

Specified by:
traceback in interface Tracer
Overrides:
traceback in class AbstractTracer<OperationCallExp>
Parameters:
context - the context type that defines the type of any self occurrence outside of operation bodies
pathCache - a global cache that remembers the navigation steps already computed for some OCL expressions
operationBodyToCallMapper - the filter synthesizer that analyzed an overall expression that contains the expression to be handled by this tracer

calculateEnteringScope

protected java.util.Set<Variable> calculateEnteringScope(OperationBodyToCallMapper operationBodyToCallMapper)
Description copied from class: AbstractTracer
Calculates the scopes the NavigationStep this Tracer creates will enter when navigated.

Overrides:
calculateEnteringScope in class AbstractTracer<OperationCallExp>
Returns:
the OCLExpressions representing the scope the created NavigationStep will enter when navigated. Always non-null, but possibly empty

calculateLeavingScopes

protected java.util.Set<Variable> calculateLeavingScopes(OperationBodyToCallMapper operationBodyToCallMapper)
When tracing into the called operation's body, all variables currently in scope are left.

Overrides:
calculateLeavingScopes in class AbstractTracer<OperationCallExp>
Returns:
the set of OCLExpressions representing the scopes the created NavigationStep will leave when navigated.