Package jetbrains.mps.generator.runtime
Interface ReferenceResolver
- 
- All Known Implementing Classes:
 RefResolver
public interface ReferenceResolverEverything one needs to know about reference macro and its resolution. New alternative to originalReferenceResolver, taking its approach to extreme, with all relevant parameters being part of the resolver. Another possible approach is to abstract with resolver execution code only, and pass relevant parameters (e.g. output node, reference, etc) as a separate context object. While latter approach is better from general perspective (code reuse), present way to define reference macros is tightly bound to output node, reference role and template node (in fact, it's the only way to define RM now), that there's little sense to escape this fact. However, once (and if) we introduce external utility functions, we might need to re-consider this approach (i.e. of few RM would happen to use same function, we'd need abstraction for execution code to be separate from RM's context). The reason I wrote this here is that there are ReferenceInfo implementations that mirror most of this ReferenceResolver2 stuff, and perhaps should be merged into a common approach. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDefaultResolveInfo()SNodegetOutputNode()SReferenceLinkgetReferenceRole()SNodeReferencegetTemplateNode()Objectresolve()FIXME perhaps, shall get a typed return value? SNode or<T>or a join of (SNode|String|SNodeReference)? 
 - 
 
- 
- 
Method Detail
- 
getTemplateNode
@NotNull SNodeReference getTemplateNode()
- Returns:
 - pointer to reference macro
 
 
- 
getDefaultResolveInfo
@Nullable String getDefaultResolveInfo()
- Returns:
 - text of link target under the macro, if any.
 
 
- 
resolve
Object resolve()
FIXME perhaps, shall get a typed return value? SNode or<T>or a join of (SNode|String|SNodeReference)? 
- 
getOutputNode
@NotNull SNode getOutputNode()
- Returns:
 - node in output model, which 
referenceis resolved 
 
- 
getReferenceRole
@NotNull SReferenceLink getReferenceRole()
- Returns:
 - association link of 
output nodewhich is initialized by this resolver 
 
 - 
 
 -