org.eclipse.ocl.examples.pivot.scoping
Class PivotScopeView

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.scoping.PivotScopeView
All Implemented Interfaces:
ScopeView

public class PivotScopeView
extends java.lang.Object
implements ScopeView

ScopeViews support access to some or all of the elements in a scope. Accesses are filtered on the fly since a cache of results does not remain valid for long enough to merit it, with incremental reparsing regularly trashing the CST.


Field Summary
protected  Element child
           
protected  boolean isQualified
           
protected  MetaModelManager metaModelManager
           
static ScopeView NULLSCOPEVIEW
          The NULLSCOPEVIEW to be returned by the most outer scope
protected  Element target
           
 
Constructor Summary
protected PivotScopeView(MetaModelManager metaModelManager, Element target, Element child, boolean isQualified)
           
 
Method Summary
 ScopeView computeLookup(EnvironmentView environmentView, org.eclipse.emf.ecore.EObject aTarget)
           
 Attribution getAttribution()
          Return Attribution instance that defines the lookup algorithm for the target node.
 Element getChild()
          Return the immediate child node for which a lookup is requested.
 org.eclipse.emf.ecore.EStructuralFeature getContainmentFeature()
          Return the containment feature of the child within the target.
 MetaModelManager getMetaModelManager()
           
 ScopeView getParent()
          Return the ScopeView that characterizes a lookup in the parent of the target node.
 ScopeView getRoot()
          Return the ScopeView that characterizes a lookup at the top level.
 Element getTarget()
          Return the target node at which this ScopeView characterizes a lookup.
 boolean isQualified()
          Return true if the lookup is within a qualified name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULLSCOPEVIEW

@NonNull
public static final ScopeView NULLSCOPEVIEW
The NULLSCOPEVIEW to be returned by the most outer scope


metaModelManager

@NonNull
protected final MetaModelManager metaModelManager

target

@NonNull
protected final Element target

child

@Nullable
protected final Element child

isQualified

protected final boolean isQualified
Constructor Detail

PivotScopeView

protected PivotScopeView(@NonNull
                         MetaModelManager metaModelManager,
                         @NonNull
                         Element target,
                         @Nullable
                         Element child,
                         boolean isQualified)
Method Detail

computeLookup

@Nullable
public ScopeView computeLookup(@NonNull
                                        EnvironmentView environmentView,
                                        @NonNull
                                        org.eclipse.emf.ecore.EObject aTarget)

getAttribution

@NonNull
public Attribution getAttribution()
Description copied from interface: ScopeView
Return Attribution instance that defines the lookup algorithm for the target node.

Specified by:
getAttribution in interface ScopeView

getChild

@Nullable
public Element getChild()
Description copied from interface: ScopeView
Return the immediate child node for which a lookup is requested.

Specified by:
getChild in interface ScopeView

getContainmentFeature

@Nullable
public org.eclipse.emf.ecore.EStructuralFeature getContainmentFeature()
Description copied from interface: ScopeView
Return the containment feature of the child within the target.

Specified by:
getContainmentFeature in interface ScopeView

getMetaModelManager

@NonNull
public MetaModelManager getMetaModelManager()

getParent

@NonNull
public ScopeView getParent()
Description copied from interface: ScopeView
Return the ScopeView that characterizes a lookup in the parent of the target node.

Specified by:
getParent in interface ScopeView

getRoot

@NonNull
public ScopeView getRoot()
Description copied from interface: ScopeView
Return the ScopeView that characterizes a lookup at the top level.

Specified by:
getRoot in interface ScopeView

getTarget

@NonNull
public final Element getTarget()
Description copied from interface: ScopeView
Return the target node at which this ScopeView characterizes a lookup.

Specified by:
getTarget in interface ScopeView

isQualified

public boolean isQualified()
Description copied from interface: ScopeView
Return true if the lookup is within a qualified name.

Specified by:
isQualified in interface ScopeView

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object