Package jetbrains.mps.generator.runtime
Class TemplateDeclarationBase
- java.lang.Object
 - 
- jetbrains.mps.generator.runtime.TemplateDeclarationBase
 
 
- 
- All Implemented Interfaces:
 TemplateDeclaration,TemplateDeclarationWeavingAware2
- Direct Known Subclasses:
 TemplateDeclarationInterpreted
public abstract class TemplateDeclarationBase extends Object implements TemplateDeclaration
Base implementation ofTemplateDeclarationto use as superclass in generated code to facilitate future API changes 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected SContainmentLink[]myAggregationLinksprotected SReferenceLink[]myAssociationLinksprotected SConcept[]myConceptsprotected SProperty[]myProperties 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedTemplateDeclarationBase() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SContainmentLink[]initAggregationLinks()protected SReferenceLink[]initAssociationLinks()protected SConcept[]initConcepts()protected SProperty[]initProperties()protected FragmentResultlistFragment(int aggregationIndex, Collection<SNode> result)Gives a presentation for an outcome of a TemplateFragment that produces sequence of nodesprotected FragmentResultnodeFragment(int aggregationIndex, SNode result)Gives a presentation for an outcome of a TemplateFragment that produces single nodeCollection<SNode>weave(NodeWeaveFacility.WeaveContext context, NodeWeaveFacility weaveFacility)- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface jetbrains.mps.generator.runtime.TemplateDeclaration
apply, getTemplateNode 
 - 
 
 - 
 
- 
- 
Field Detail
- 
myConcepts
protected final SConcept[] myConcepts
 
- 
myProperties
protected final SProperty[] myProperties
 
- 
myAssociationLinks
protected final SReferenceLink[] myAssociationLinks
 
- 
myAggregationLinks
protected final SContainmentLink[] myAggregationLinks
 
 - 
 
- 
Method Detail
- 
weave
public Collection<SNode> weave(@NotNull NodeWeaveFacility.WeaveContext context, @NotNull NodeWeaveFacility weaveFacility) throws GenerationException
- Specified by:
 weavein interfaceTemplateDeclarationWeavingAware2- Throws:
 GenerationException
 
- 
listFragment
protected final FragmentResult listFragment(int aggregationIndex, Collection<SNode> result)
Gives a presentation for an outcome of a TemplateFragment that produces sequence of nodes- Parameters:
 aggregationIndex- index in myAggregationLinksresult- may be null. KEPT BY REFERENCE (I assume that collection won't get modified) (XXX could be Iterable, if needed)- Returns:
 - never null
 
 
- 
nodeFragment
protected final FragmentResult nodeFragment(int aggregationIndex, SNode result)
Gives a presentation for an outcome of a TemplateFragment that produces single node- Parameters:
 aggregationIndex- index in myAggregationLinksresult- may be null- Returns:
 - never null
 
 
- 
initConcepts
protected SConcept[] initConcepts()
 
- 
initProperties
protected SProperty[] initProperties()
 
- 
initAssociationLinks
protected SReferenceLink[] initAssociationLinks()
 
- 
initAggregationLinks
protected SContainmentLink[] initAggregationLinks()
 
 - 
 
 -