Package jetbrains.mps.generator.runtime
Class WeaveRuleBase
- java.lang.Object
 - 
- jetbrains.mps.generator.runtime.WeaveRuleBase
 
 
- 
- All Implemented Interfaces:
 TemplateRule,TemplateRuleForConcept,TemplateRuleWithCondition,TemplateWeavingRule,WeavingWithAnchor
- Direct Known Subclasses:
 TemplateWeavingRuleInterpreted
public abstract class WeaveRuleBase extends Object implements TemplateWeavingRule
Base implementation ofTemplateWeavingRuleto use as superclass in generated code to facilitate future API changes 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedWeaveRuleBase(SNodeReference ruleNode, SAbstractConcept appConcept, boolean applyToSubConcepts) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplyToInheritors()SNodegetAnchorNode(TemplateContext context, SNode outputParent, SNode outputNode)anchor node to followoutputNodein the children list ofoutputParent,nullindicating 'end of the list',SAbstractConceptgetApplicableConcept()SNodeReferencegetRuleNode()booleanisApplicable(TemplateContext context)Subclasses can rely on default implementation to returntrue.- 
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.TemplateWeavingRule
apply, getContextNode 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
WeaveRuleBase
protected WeaveRuleBase(@NotNull SNodeReference ruleNode, @NotNull SAbstractConcept appConcept, boolean applyToSubConcepts)
 
 - 
 
- 
Method Detail
- 
isApplicable
public boolean isApplicable(@NotNull TemplateContext context) throws GenerationException
Subclasses can rely on default implementation to returntrue.- Specified by:
 isApplicablein interfaceTemplateRuleWithCondition- Throws:
 GenerationException
 
- 
getRuleNode
@NotNull public SNodeReference getRuleNode()
- Specified by:
 getRuleNodein interfaceTemplateRule
 
- 
getApplicableConcept
@NotNull public final SAbstractConcept getApplicableConcept()
- Specified by:
 getApplicableConceptin interfaceTemplateRuleForConcept- Returns:
 - concept to trigger this rule
 
 
- 
applyToInheritors
public boolean applyToInheritors()
- Specified by:
 applyToInheritorsin interfaceTemplateRuleForConcept
 
- 
getAnchorNode
@Nullable public SNode getAnchorNode(@NotNull TemplateContext context, @NotNull SNode outputParent, @NotNull SNode outputNode) throws GenerationFailureException
Description copied from interface:WeavingWithAnchoranchor node to followoutputNodein the children list ofoutputParent,nullindicating 'end of the list',- Specified by:
 getAnchorNodein interfaceWeavingWithAnchor- Throws:
 GenerationFailureException
 
 - 
 
 -