Package jetbrains.mps.generator.runtime
Class MapRootRuleBase
- java.lang.Object
 - 
- jetbrains.mps.generator.runtime.MapRootRuleBase
 
 
- 
- All Implemented Interfaces:
 TemplateRootMappingRule,TemplateRule,TemplateRuleForConcept,TemplateRuleWithCondition
- Direct Known Subclasses:
 TemplateRootMappingRuleInterpreted
public abstract class MapRootRuleBase extends Object implements TemplateRootMappingRule
Base implementation ofTemplateRootMappingRuleto use as superclass in generated code to facilitate future API changes 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedMapRootRuleBase(SNodeReference ruleNode, SAbstractConcept appConcept, boolean applyToSubConcepts, boolean keepSourceRoot) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplyToInheritors()SAbstractConceptgetApplicableConcept()SNodeReferencegetRuleNode()booleanisApplicable(TemplateContext context)Default implementation subclasses can rely on, alwaystruebooleankeepSourceRoot()- 
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.TemplateRootMappingRule
apply 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
MapRootRuleBase
protected MapRootRuleBase(@NotNull SNodeReference ruleNode, @NotNull SAbstractConcept appConcept, boolean applyToSubConcepts, boolean keepSourceRoot)
- Parameters:
 ruleNode- identifies rule for navigation/error reportingappConcept- concept to trigger ruleapplyToSubConcepts-trueto apply to appConcept's sub-conceptskeepSourceRoot-trueto preserve root in input model for further processing- Since:
 - 3.3
 
 
 - 
 
- 
Method Detail
- 
getApplicableConcept
@NotNull public final SAbstractConcept getApplicableConcept()
- Specified by:
 getApplicableConceptin interfaceTemplateRuleForConcept- Returns:
 - concept to trigger this rule
 
 
- 
applyToInheritors
public boolean applyToInheritors()
- Specified by:
 applyToInheritorsin interfaceTemplateRuleForConcept
 
- 
getRuleNode
@NotNull public SNodeReference getRuleNode()
- Specified by:
 getRuleNodein interfaceTemplateRule
 
- 
keepSourceRoot
public boolean keepSourceRoot()
- Specified by:
 keepSourceRootin interfaceTemplateRootMappingRule
 
- 
isApplicable
public boolean isApplicable(@NotNull TemplateContext context) throws GenerationException
Default implementation subclasses can rely on, alwaystrue- Specified by:
 isApplicablein interfaceTemplateRuleWithCondition- Throws:
 GenerationException
 
 - 
 
 -