Package jetbrains.mps.generator.runtime
Class ReferenceReductionRuleBase
- java.lang.Object
 - 
- jetbrains.mps.generator.runtime.ReferenceReductionRuleBase
 
 
- 
- All Implemented Interfaces:
 ReferenceReductionRule,TemplateRule,TemplateRuleForConcept,TemplateRuleWithCondition
- Direct Known Subclasses:
 RefReductionRuleInterpreted
public abstract class ReferenceReductionRuleBase extends Object implements ReferenceReductionRule
- Since:
 - 2017.3
 
 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedReferenceReductionRuleBase(SNodeReference ruleNode, SReferenceLink applicableLink, SAbstractConcept applicableConcept) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SAbstractConceptgetApplicableConcept()SReferenceLinkgetApplicableLink()SNodeReferencegetRuleNode()booleanisApplicable(TemplateContext context)Tell whether rule can be applied in the context FIXME shall throw GenerationFailureException (neither Dismiss/Abandon nor Cancel could not get thrown from within) but has to re-generate generated generators that implement this method (either with narrowed throws or without any at all)- 
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.ReferenceReductionRule
apply, applyToInheritors 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
ReferenceReductionRuleBase
protected ReferenceReductionRuleBase(@NotNull SNodeReference ruleNode, @NotNull SReferenceLink applicableLink, @Nullable SAbstractConcept applicableConcept)
 
 - 
 
- 
Method Detail
- 
getApplicableLink
@NotNull public SReferenceLink getApplicableLink()
- Specified by:
 getApplicableLinkin interfaceReferenceReductionRule- Returns:
 - association link to trigger this rule
 
 
- 
getApplicableConcept
@NotNull public SAbstractConcept getApplicableConcept()
- Specified by:
 getApplicableConceptin interfaceReferenceReductionRule- Specified by:
 getApplicableConceptin interfaceTemplateRuleForConcept- Returns:
 - concept to trigger this rule
 
 
- 
isApplicable
public boolean isApplicable(@NotNull TemplateContext context) throws GenerationFailureException
Description copied from interface:TemplateRuleWithConditionTell whether rule can be applied in the context FIXME shall throw GenerationFailureException (neither Dismiss/Abandon nor Cancel could not get thrown from within) but has to re-generate generated generators that implement this method (either with narrowed throws or without any at all)- Specified by:
 isApplicablein interfaceReferenceReductionRule- Specified by:
 isApplicablein interfaceTemplateRuleWithCondition- Throws:
 GenerationFailureException
 
- 
getRuleNode
@NotNull public SNodeReference getRuleNode()
- Specified by:
 getRuleNodein interfaceTemplateRule
 
 - 
 
 -