Package jetbrains.mps.smodel
Class SReferenceBase
- java.lang.Object
 - 
- jetbrains.mps.smodel.SReference
 - 
- jetbrains.mps.smodel.SReferenceBase
 
 
 
- 
- All Implemented Interfaces:
 SReference
- Direct Known Subclasses:
 DynamicReference,StaticReference
public abstract class SReferenceBase extends SReference
Igor Alshannikov Sep 28, 2007 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class jetbrains.mps.smodel.SReference
SReference.ProblemDescription 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description protected SNodemyImmatureTargetNode- 
Fields inherited from class jetbrains.mps.smodel.SReference
EMPTY_ARRAY, mySourceNode 
 - 
 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedSReferenceBase(SReferenceLink role, SNode sourceNode, SNode immatureTargetNode) 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringgetResolveInfo(SNode immatureNode)abstract SModelReferencegetTargetSModelReference()The following two operations are defined only for references which can instantly respond to the request (e.g.booleanisDirect()booleanmakeIndirect()booleanmakeIndirect(boolean force)It's possible to make reference 'mature' iff both its source and target nodes belong to a model.protected voidmakeMature()voidsetTargetSModelReference(SModelReference modelReference)- 
Methods inherited from class jetbrains.mps.smodel.SReference
create, create, create, create, create, disableLogging, enableLogging, error, getLink, getResolveInfo, getRole, getSourceNode, getTargetNode, getTargetNode_internal, getTargetNodeId, getTargetNodeReference, getTargetNodeSilently, makeDirect, setResolveInfo 
 - 
 
 - 
 
- 
- 
Field Detail
- 
myImmatureTargetNode
protected volatile SNode myImmatureTargetNode
 
 - 
 
- 
Constructor Detail
- 
SReferenceBase
protected SReferenceBase(SReferenceLink role, SNode sourceNode, @Nullable SNode immatureTargetNode)
 
 - 
 
- 
Method Detail
- 
getTargetSModelReference
public abstract SModelReference getTargetSModelReference()
Description copied from interface:SReferenceThe following two operations are defined only for references which can instantly respond to the request (e.g. they store the target model reference and/or node id as a part of the reference).- Specified by:
 getTargetSModelReferencein interfaceSReference- Specified by:
 getTargetSModelReferencein classSReference- Returns:
 - target model reference (if available)
 
 
- 
setTargetSModelReference
public void setTargetSModelReference(@NotNull SModelReference modelReference)
 
- 
isDirect
public boolean isDirect()
 
- 
makeIndirect
public final boolean makeIndirect()
- Overrides:
 makeIndirectin classSReference
 
- 
makeIndirect
public final boolean makeIndirect(boolean force)
It's possible to make reference 'mature' iff both its source and target nodes belong to a model. It's not clear what if these models are not attached to a repository, why would we care to make reference 'indirect' in this case.- Returns:
 truewhen/if reference became 'mature' (i.e. doesn't have target node object but its identity)
 
- 
makeMature
protected void makeMature()
 
 - 
 
 -