Class QueryProviderBase.Defaults
- java.lang.Object
 - 
- jetbrains.mps.generator.impl.query.QueryProviderBase.Defaults
 
 
- 
- All Implemented Interfaces:
 CreateRootCondition,DropAttributeRuleCondition,DropRuleCondition,MapConfigurationCondition,MapRootRuleCondition,PatternRuleQuery,Query,ReductionRuleCondition,ScriptCodeBlock,SourceNodeQuery,SourceNodesQuery,WeaveAnchorQuery,WeaveRuleCondition,WeaveRuleQuery
- Enclosing class:
 - QueryProviderBase
 
public static class QueryProviderBase.Defaults extends Object implements CreateRootCondition, MapRootRuleCondition, ReductionRuleCondition, PatternRuleQuery, DropRuleCondition, WeaveRuleCondition, WeaveRuleQuery, ScriptCodeBlock, MapConfigurationCondition, SourceNodeQuery, SourceNodesQuery, WeaveAnchorQuery, DropAttributeRuleCondition
Reasonable default values for all conditions and queries. Note, these default values represent the case when no condition/query was specified. There might be another set of defaults for cases when condition failed to evaluate. 
- 
- 
Constructor Summary
Constructors Constructor Description Defaults() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SNodeanchorNode(WeavingAnchorContext ctx)Optional query to get anchor node for a node being weaved.booleancheck(CreateRootRuleContext ctx)booleancheck(DropAttributeRuleContext ctx)booleancheck(DropRootRuleContext ctx)booleancheck(MapRootRuleContext ctx)booleancheck(ReductionRuleQueryContext ctx)booleancheck(TemplateQueryContext ctx)booleancheck(WeavingMappingRuleContext ctx)SNodecontextNode(WeavingMappingRuleContext ctx)Mandatory query of a rule that gives node in output model that would serve as parent for weaved nodesSNodeevaluate(SourceSubstituteMacroNodeContext context)Collection<SNode>evaluate(SourceSubstituteMacroNodesContext context)voidinvoke(MappingScriptContext ctx)GeneratedMatchingPatternpattern(PatternRuleContext ctx) 
 - 
 
- 
- 
Method Detail
- 
check
public boolean check(@NotNull CreateRootRuleContext ctx)
- Specified by:
 checkin interfaceCreateRootCondition
 
- 
check
public boolean check(@NotNull MapRootRuleContext ctx)
- Specified by:
 checkin interfaceMapRootRuleCondition
 
- 
check
public boolean check(@NotNull DropRootRuleContext ctx)
- Specified by:
 checkin interfaceDropRuleCondition
 
- 
check
public boolean check(@NotNull DropAttributeRuleContext ctx)
- Specified by:
 checkin interfaceDropAttributeRuleCondition
 
- 
check
public boolean check(@NotNull ReductionRuleQueryContext ctx)
- Specified by:
 checkin interfaceReductionRuleCondition
 
- 
check
public boolean check(@NotNull WeavingMappingRuleContext ctx)
- Specified by:
 checkin interfaceWeaveRuleCondition
 
- 
contextNode
public SNode contextNode(WeavingMappingRuleContext ctx)
Description copied from interface:WeaveRuleQueryMandatory query of a rule that gives node in output model that would serve as parent for weaved nodes- Specified by:
 contextNodein interfaceWeaveRuleQuery- Parameters:
 ctx- environment for the query, nevernull- Returns:
 - parent node in output model for nodes being weaved into
 
 
- 
pattern
public GeneratedMatchingPattern pattern(@NotNull PatternRuleContext ctx)
- Specified by:
 patternin interfacePatternRuleQuery
 
- 
check
public boolean check(@NotNull TemplateQueryContext ctx)
- Specified by:
 checkin interfaceMapConfigurationCondition
 
- 
invoke
public void invoke(MappingScriptContext ctx)
- Specified by:
 invokein interfaceScriptCodeBlock
 
- 
evaluate
@Nullable public SNode evaluate(@NotNull SourceSubstituteMacroNodeContext context) throws GenerationFailureException
- Specified by:
 evaluatein interfaceSourceNodeQuery- Throws:
 GenerationFailureException
 
- 
evaluate
@NotNull public Collection<SNode> evaluate(@NotNull SourceSubstituteMacroNodesContext context) throws GenerationFailureException
- Specified by:
 evaluatein interfaceSourceNodesQuery- Throws:
 GenerationFailureException
 
- 
anchorNode
@Nullable public SNode anchorNode(WeavingAnchorContext ctx)
Description copied from interface:WeaveAnchorQueryOptional query to get anchor node for a node being weaved.- Specified by:
 anchorNodein interfaceWeaveAnchorQuery- Parameters:
 ctx- environment for the query, nevernull- Returns:
 - node to appear next to the weaved one, or 
nullto append weaved node to the end of children node list 
 
 - 
 
 -