Package jetbrains.mps.smodel.constraints
Class ReferentConstraintsContextImpl
- java.lang.Object
 - 
- jetbrains.mps.smodel.constraints.ReferentConstraintsContextImpl
 
 
- 
- All Implemented Interfaces:
 ReferenceConstraintsContext
- Direct Known Subclasses:
 PresentationReferentConstraintsContextImpl
public class ReferentConstraintsContextImpl extends Object implements ReferenceConstraintsContext
 
- 
- 
Constructor Summary
Constructors Constructor Description ReferentConstraintsContextImpl(SNode contextNode, SContainmentLink containmentLink, int position, SNode referenceNode, boolean exists, SAbstractConcept targetConcept) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SNodegetContainingLink()SContainmentLinkgetContainmentLink()SNodegetContextNode()StringgetContextRole()SNodegetEnclosingNode()SNodegetLinkTarget()SAbstractConceptgetLinkTargetConcept()SModelgetModel()intgetPosition()SNodegetReferenceNode()booleanisExists() 
 - 
 
- 
- 
Constructor Detail
- 
ReferentConstraintsContextImpl
public ReferentConstraintsContextImpl(@NotNull SNode contextNode, @Nullable SContainmentLink containmentLink, int position, @Nullable SNode referenceNode, boolean exists, @NotNull SAbstractConcept targetConcept)
 
 - 
 
- 
Method Detail
- 
getContainmentLink
public SContainmentLink getContainmentLink()
- Specified by:
 getContainmentLinkin interfaceReferenceConstraintsContext- Returns:
 - containment link between context node and it's child, or null if context node is a node with the reference
 
 
- 
isExists
public boolean isExists()
- Specified by:
 isExistsin interfaceReferenceConstraintsContext- Returns:
 - true if the reference exists
 
 
- 
getContextNode
@NotNull public SNode getContextNode()
- Specified by:
 getContextNodein interfaceReferenceConstraintsContext- Returns:
 - closest not-null ancestor of the reference
 
 
- 
getContextRole
public String getContextRole()
- Specified by:
 getContextRolein interfaceReferenceConstraintsContext
 
- 
getPosition
public int getPosition()
- Specified by:
 getPositionin interfaceReferenceConstraintsContext- Returns:
 - position in containment link
 
 
- 
getModel
public SModel getModel()
- Specified by:
 getModelin interfaceReferenceConstraintsContext- Returns:
 - context model
 
 
- 
getEnclosingNode
public SNode getEnclosingNode()
- Specified by:
 getEnclosingNodein interfaceReferenceConstraintsContext
 
- 
getReferenceNode
@Nullable public SNode getReferenceNode()
- Specified by:
 getReferenceNodein interfaceReferenceConstraintsContext- Returns:
 - node that contains the reference
 
 
- 
getLinkTargetConcept
@NotNull public SAbstractConcept getLinkTargetConcept()
- Specified by:
 getLinkTargetConceptin interfaceReferenceConstraintsContext- Returns:
 - concrete target concept of the reference
 
 
- 
getLinkTarget
public SNode getLinkTarget()
- Specified by:
 getLinkTargetin interfaceReferenceConstraintsContext
 
- 
getContainingLink
public SNode getContainingLink()
- Specified by:
 getContainingLinkin interfaceReferenceConstraintsContext
 
 - 
 
 -