package jetbrains.mps.lang.descriptor.generator.template.main;

/*Generated by MPS */

import jetbrains.mps.generator.runtime.Generated;
import jetbrains.mps.generator.runtime.MapConfigBase;
import jetbrains.mps.generator.runtime.TemplateMappingConfiguration;
import java.util.Collection;
import jetbrains.mps.generator.runtime.TemplateReductionRule;
import jetbrains.mps.generator.runtime.TemplateCreateRootRule;
import jetbrains.mps.generator.runtime.TemplateRootMappingRule;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.generator.runtime.TemplateModel;
import jetbrains.mps.smodel.SNodePointer;
import jetbrains.mps.generator.runtime.TemplateUtil;
import jetbrains.mps.generator.template.ITemplateGenerator;
import jetbrains.mps.generator.template.TemplateQueryContext;
import jetbrains.mps.generator.runtime.ReductionRuleBase;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.generator.runtime.TemplateContext;
import jetbrains.mps.generator.runtime.GenerationException;
import jetbrains.mps.generator.runtime.TemplateExecutionEnvironment;
import jetbrains.mps.generator.template.BaseMappingRuleContext;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodeContext;
import org.jetbrains.mps.openapi.model.SNodeAccessUtil;
import jetbrains.mps.generator.template.PropertyMacroContext;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodesContext;
import jetbrains.mps.generator.runtime.MapRootRuleBase;
import jetbrains.mps.generator.template.MapRootRuleContext;
import jetbrains.mps.generator.runtime.CreateRootRuleBase;
import jetbrains.mps.generator.runtime.MetaObjectContainer;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SProperty;
import org.jetbrains.mps.openapi.language.SReferenceLink;
import org.jetbrains.mps.openapi.language.SContainmentLink;

@Generated
public class Mapping_GeneratorModule extends MapConfigBase implements TemplateMappingConfiguration {
  private final Collection<TemplateReductionRule> rules;
  private final Collection<TemplateCreateRootRule> createRules;
  private final Collection<TemplateRootMappingRule> rootRules;
  public Mapping_GeneratorModule(@NotNull TemplateModel model) {
    super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "8780540425167303785"), "GeneratorModule", model, false, new MO());
    rules = TemplateUtil.<TemplateReductionRule>asCollection(new ReductionRule0(), new ReductionRule1(), new ReductionRule2(), new ReductionRule3(), new ReductionRule4(), new ReductionRule5());
    createRules = TemplateUtil.<TemplateCreateRootRule>asCollection(new CreateRootRule0());
    rootRules = TemplateUtil.<TemplateRootMappingRule>asCollection(new RootMappingRule0(), new RootMappingRule1());
  }
  @Override
  public boolean isApplicable(@NotNull ITemplateGenerator generator) {
    return QueriesGenerated.mc_Condition_1(new TemplateQueryContext(getMappingNode(), generator));
  }
  @Override
  public Collection<TemplateReductionRule> getReductionRules() {
    return rules;
  }
  @Override
  public Collection<TemplateCreateRootRule> getCreateRules() {
    return createRules;
  }
  @Override
  public Collection<TemplateRootMappingRule> getRootRules() {
    return rootRules;
  }
  /*package*/ final class ReductionRule0 extends ReductionRuleBase {
    public ReductionRule0() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839815"), CONCEPTS.MappingPriorityRule$8Q, false);
    }
    @Override
    public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      Collection<SNode> tlist1 = null;
      if (QueriesGenerated.rule_Condition_1_0(new BaseMappingRuleContext(context, rule))) {
        final SNode tnode2 = environment.createOutputNode(myConcepts[0]);
        {
          environment.associate(tnode2, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createStrictlyBeforeRule(jetbrains.mps.generator.runtime.TemplateMappingConfigRef,jetbrains.mps.generator.runtime.TemplateMappingConfigRef)");
          environment.associate(tnode2, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
          TemplateContext context1 = context.subContext();
          {
            Collection<SNode> tlist3 = null;
            final SNode copySrcInput3 = QueriesGenerated.sourceNodeQuery_1_0(new SourceSubstituteMacroNodeContext(context1, copySrcMacro));
            tlist3 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput3), copySrcMacro, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1820665478710839873", context1);
            environment.aggregate(tnode2, myAggregationLinks[0], tlist3);
          }
          {
            Collection<SNode> tlist4 = null;
            final SNode copySrcInput4 = QueriesGenerated.sourceNodeQuery_1_1(new SourceSubstituteMacroNodeContext(context1, copySrcMacro1));
            tlist4 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput4), copySrcMacro1, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1820665478710839877", context1);
            environment.aggregate(tnode2, myAggregationLinks[0], tlist4);
          }
        }
        tlist1 = TemplateUtil.singletonList(tnode2);
      } else if (QueriesGenerated.rule_Condition_1_1(new BaseMappingRuleContext(context, rule))) {
        final SNode tnode5 = environment.createOutputNode(myConcepts[0]);
        {
          environment.associate(tnode5, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createBeforeOrTogetherRule(jetbrains.mps.generator.runtime.TemplateMappingConfigRef,jetbrains.mps.generator.runtime.TemplateMappingConfigRef)");
          environment.associate(tnode5, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
          TemplateContext context2 = context.subContext();
          {
            Collection<SNode> tlist6 = null;
            final SNode copySrcInput6 = QueriesGenerated.sourceNodeQuery_1_2(new SourceSubstituteMacroNodeContext(context2, copySrcMacro2));
            tlist6 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput6), copySrcMacro2, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1820665478710839957", context2);
            environment.aggregate(tnode5, myAggregationLinks[0], tlist6);
          }
          {
            Collection<SNode> tlist7 = null;
            final SNode copySrcInput7 = QueriesGenerated.sourceNodeQuery_1_3(new SourceSubstituteMacroNodeContext(context2, copySrcMacro3));
            tlist7 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput7), copySrcMacro3, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1820665478710839965", context2);
            environment.aggregate(tnode5, myAggregationLinks[0], tlist7);
          }
        }
        tlist1 = TemplateUtil.singletonList(tnode5);
      } else if (QueriesGenerated.rule_Condition_1_2(new BaseMappingRuleContext(context, rule))) {
        final SNode tnode8 = environment.createOutputNode(myConcepts[0]);
        {
          environment.associate(tnode8, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createStrictlyAfterRule(jetbrains.mps.generator.runtime.TemplateMappingConfigRef,jetbrains.mps.generator.runtime.TemplateMappingConfigRef)");
          environment.associate(tnode8, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
          TemplateContext context3 = context.subContext();
          {
            Collection<SNode> tlist9 = null;
            final SNode copySrcInput9 = QueriesGenerated.sourceNodeQuery_1_4(new SourceSubstituteMacroNodeContext(context3, copySrcMacro4));
            tlist9 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput9), copySrcMacro4, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/2643213347103793323", context3);
            environment.aggregate(tnode8, myAggregationLinks[0], tlist9);
          }
          {
            Collection<SNode> tlist10 = null;
            final SNode copySrcInput10 = QueriesGenerated.sourceNodeQuery_1_5(new SourceSubstituteMacroNodeContext(context3, copySrcMacro5));
            tlist10 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput10), copySrcMacro5, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/2643213347103793331", context3);
            environment.aggregate(tnode8, myAggregationLinks[0], tlist10);
          }
        }
        tlist1 = TemplateUtil.singletonList(tnode8);
      } else if (QueriesGenerated.rule_Condition_1_3(new BaseMappingRuleContext(context, rule))) {
        final SNode tnode11 = environment.createOutputNode(myConcepts[0]);
        {
          environment.associate(tnode11, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createAfterOrTogetherRule(jetbrains.mps.generator.runtime.TemplateMappingConfigRef,jetbrains.mps.generator.runtime.TemplateMappingConfigRef)");
          environment.associate(tnode11, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
          TemplateContext context4 = context.subContext();
          {
            Collection<SNode> tlist12 = null;
            final SNode copySrcInput12 = QueriesGenerated.sourceNodeQuery_1_6(new SourceSubstituteMacroNodeContext(context4, copySrcMacro6));
            tlist12 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput12), copySrcMacro6, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/2643213347103793340", context4);
            environment.aggregate(tnode11, myAggregationLinks[0], tlist12);
          }
          {
            Collection<SNode> tlist13 = null;
            final SNode copySrcInput13 = QueriesGenerated.sourceNodeQuery_1_7(new SourceSubstituteMacroNodeContext(context4, copySrcMacro7));
            tlist13 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput13), copySrcMacro7, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/2643213347103793348", context4);
            environment.aggregate(tnode11, myAggregationLinks[0], tlist13);
          }
        }
        tlist1 = TemplateUtil.singletonList(tnode11);
      } else {
        final SNode tnode14 = environment.createOutputNode(myConcepts[0]);
        {
          environment.associate(tnode14, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createStrictlyTogetherRule(jetbrains.mps.generator.runtime.TemplateMappingConfigRef,jetbrains.mps.generator.runtime.TemplateMappingConfigRef)");
          environment.associate(tnode14, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
          TemplateContext context5 = context.subContext();
          {
            Collection<SNode> tlist15 = null;
            final SNode copySrcInput15 = QueriesGenerated.sourceNodeQuery_1_8(new SourceSubstituteMacroNodeContext(context5, copySrcMacro8));
            tlist15 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput15), copySrcMacro8, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1820665478710839974", context5);
            environment.aggregate(tnode14, myAggregationLinks[0], tlist15);
          }
          {
            Collection<SNode> tlist16 = null;
            final SNode copySrcInput16 = QueriesGenerated.sourceNodeQuery_1_9(new SourceSubstituteMacroNodeContext(context5, copySrcMacro9));
            tlist16 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput16), copySrcMacro9, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1820665478710839982", context5);
            environment.aggregate(tnode14, myAggregationLinks[0], tlist16);
          }
        }
        tlist1 = TemplateUtil.singletonList(tnode14);
      }
      return tlist1;
    }
  }
  /*package*/ final class ReductionRule1 extends ReductionRuleBase {
    public ReductionRule1() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839990"), CONCEPTS.MappingConfigExternalRef$4M, false);
    }
    @Override
    public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      final SNode tnode1 = environment.createOutputNode(myConcepts[0]);
      {
        environment.associate(tnode1, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createRefExternal(java.lang.String,jetbrains.mps.generator.runtime.TemplateMappingConfigRef)");
        environment.associate(tnode1, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
        TemplateContext context1 = context.subContext();
        {
          final SNode tnode2 = environment.createOutputNode(myConcepts[1]);
          SNodeAccessUtil.setPropertyValue(tnode2, myProperties[0], QueriesGenerated.propertyMacro_GetValue_1_0(new PropertyMacroContext(context1, "", propertyMacro)));
          environment.aggregate(tnode1, myAggregationLinks[0], tnode2);
        }
        {
          Collection<SNode> tlist3 = null;
          final SNode copySrcInput3 = QueriesGenerated.sourceNodeQuery_1_10(new SourceSubstituteMacroNodeContext(context1, copySrcMacro10));
          tlist3 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput3), copySrcMacro10, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1820665478710840109", context1);
          environment.aggregate(tnode1, myAggregationLinks[0], tlist3);
        }
      }
      return TemplateUtil.singletonList(tnode1);
    }
  }
  /*package*/ final class ReductionRule2 extends ReductionRuleBase {
    public ReductionRule2() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710840028"), CONCEPTS.MappingConfigNormalRef$Ae, false);
    }
    @Override
    public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      final SNode tnode1 = environment.createOutputNode(myConcepts[0]);
      {
        environment.associate(tnode1, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
        environment.associate(tnode1, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createRefNormal(java.lang.String,java.lang.String,java.lang.String)");
        TemplateContext context1 = context.subContext();
        {
          final SNode tnode2 = environment.createOutputNode(myConcepts[1]);
          SNodeAccessUtil.setPropertyValue(tnode2, myProperties[0], QueriesGenerated.propertyMacro_GetValue_1_1(new PropertyMacroContext(context1, "", propertyMacro1)));
          environment.aggregate(tnode1, myAggregationLinks[0], tnode2);
        }
        {
          final SNode tnode3 = environment.createOutputNode(myConcepts[1]);
          SNodeAccessUtil.setPropertyValue(tnode3, myProperties[0], QueriesGenerated.propertyMacro_GetValue_1_2(new PropertyMacroContext(context1, "", propertyMacro2)));
          environment.aggregate(tnode1, myAggregationLinks[0], tnode3);
        }
        {
          final SNode tnode4 = environment.createOutputNode(myConcepts[1]);
          SNodeAccessUtil.setPropertyValue(tnode4, myProperties[0], QueriesGenerated.propertyMacro_GetValue_1_3(new PropertyMacroContext(context1, "", propertyMacro3)));
          environment.aggregate(tnode1, myAggregationLinks[0], tnode4);
        }
      }
      return TemplateUtil.singletonList(tnode1);
    }
  }
  /*package*/ final class ReductionRule3 extends ReductionRuleBase {
    public ReductionRule3() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710840031"), CONCEPTS.MappingConfigRefAllGlobal$T_, false);
    }
    @Override
    public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      final SNode tnode1 = environment.createOutputNode(myConcepts[0]);
      environment.associate(tnode1, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createRefGlobal()");
      environment.associate(tnode1, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
      return TemplateUtil.singletonList(tnode1);
    }
  }
  /*package*/ final class ReductionRule4 extends ReductionRuleBase {
    public ReductionRule4() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710840034"), CONCEPTS.MappingConfigRefAllLocal$QZ, false);
    }
    @Override
    public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      final SNode tnode1 = environment.createOutputNode(myConcepts[0]);
      environment.associate(tnode1, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createRefLocal()");
      environment.associate(tnode1, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
      return TemplateUtil.singletonList(tnode1);
    }
  }
  /*package*/ final class ReductionRule5 extends ReductionRuleBase {
    public ReductionRule5() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710840037"), CONCEPTS.MappingConfigRefSet$Ta, false);
    }
    @Override
    public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      final SNode tnode1 = environment.createOutputNode(myConcepts[0]);
      {
        environment.associate(tnode1, myAssociationLinks[0], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil.createRefSet(jetbrains.mps.generator.runtime.TemplateMappingConfigRef...)");
        environment.associate(tnode1, myAssociationLinks[1], "215c4c45-ba99-49f5-9ab7-4b6901a63cfd/java:jetbrains.mps.generator.runtime(MPS.Generator/)", "~TemplateUtil");
        TemplateContext context1 = context.subContext();
        {
          Collection<SNode> tlist2 = null;
          final Iterable<SNode> copyListInput2 = QueriesGenerated.sourceNodesQuery_1_0(new SourceSubstituteMacroNodesContext(context1, copySrcListMacro));
          tlist2 = environment.copyNodes(copyListInput2, copySrcListMacro, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1820665478710840044", context1);
          environment.aggregate(tnode1, myAggregationLinks[0], tlist2);
        }
      }
      return TemplateUtil.singletonList(tnode1);
    }
  }
  /*package*/ final class RootMappingRule0 extends MapRootRuleBase implements TemplateRootMappingRule {
    public RootMappingRule0() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "263208052639681036"), CONCEPTS.GeneratorDescriptor$hF, false, false);
    }
    @Override
    public boolean isApplicable(@NotNull TemplateContext context) throws GenerationException {
      return QueriesGenerated.rule_Condition_1_4(new MapRootRuleContext(context, getRuleNode()));
    }
    @Override
    public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      Collection<SNode> result = environment.callSite(new Template_GDClass(), new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "263208052639681036")).apply(context);
      return result;
    }
  }
  /*package*/ final class RootMappingRule1 extends MapRootRuleBase implements TemplateRootMappingRule {
    public RootMappingRule1() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1066600152715707458"), CONCEPTS.GeneratorDescriptor$hF, false, false);
    }
    @Override
    public boolean isApplicable(@NotNull TemplateContext context) throws GenerationException {
      return QueriesGenerated.rule_Condition_1_5(new MapRootRuleContext(context, getRuleNode()));
    }
    @Override
    public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      Collection<SNode> result = environment.callSite(new Template_InterpretedGeneratorRuntimeDescriptor(), new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1066600152715707458")).apply(context);
      return result;
    }
  }
  /*package*/ final class CreateRootRule0 extends CreateRootRuleBase implements TemplateCreateRootRule {
    public CreateRootRule0() {
      super(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "8780540425167303917"));
    }
    public Collection<SNode> apply(TemplateContext context) throws GenerationException {
      final TemplateExecutionEnvironment environment = context.getEnvironment();
      Collection<SNode> result = environment.callSite(new Template_generator_descriptor(), new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "8780540425167303917")).apply(context);
      return result;
    }
  }

  /*package*/ static final class MO implements MetaObjectContainer {
    @Override
    public SConcept[] concepts() {
      SConcept[] rv = new SConcept[2];
      rv[0] = MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xfbbebabf09L, "StaticMethodCall");
      rv[1] = MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf93d565d10L, "StringLiteral");
      return rv;
    }

    @Override
    public SProperty[] properties() {
      SProperty[] rv = new SProperty[1];
      rv[0] = MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value");
      return rv;
    }

    @Override
    public SReferenceLink[] associations() {
      SReferenceLink[] rv = new SReferenceLink[2];
      rv[0] = MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11857355952L, 0xf8c78301adL, "baseMethodDeclaration");
      rv[1] = MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfbbebabf09L, 0x10a7588b546L, "classConcept");
      return rv;
    }

    @Override
    public SContainmentLink[] aggregations() {
      SContainmentLink[] rv = new SContainmentLink[1];
      rv[0] = MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11857355952L, 0xf8c78301aeL, "actualArgument");
      return rv;
    }
  }
  private static final SNodePointer rule = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839815");
  private static final SNodePointer copySrcMacro = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839874");
  private static final SNodePointer copySrcMacro1 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839878");
  private static final SNodePointer copySrcMacro2 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839958");
  private static final SNodePointer copySrcMacro3 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839966");
  private static final SNodePointer copySrcMacro4 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "2643213347103793324");
  private static final SNodePointer copySrcMacro5 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "2643213347103793332");
  private static final SNodePointer copySrcMacro6 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "2643213347103793341");
  private static final SNodePointer copySrcMacro7 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "2643213347103793349");
  private static final SNodePointer copySrcMacro8 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839975");
  private static final SNodePointer copySrcMacro9 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710839983");
  private static final SNodePointer propertyMacro = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710840121");
  private static final SNodePointer copySrcMacro10 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710840111");
  private static final SNodePointer propertyMacro1 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710840069");
  private static final SNodePointer propertyMacro2 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1820665478710840072");
  private static final SNodePointer propertyMacro3 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "6921375397022274339");
  private static final SNodePointer copySrcListMacro = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "3342058859868692953");

  private static final class CONCEPTS {
    /*package*/ static final SConcept MappingPriorityRule$8Q = MetaAdapterFactory.getConcept(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x5869770da61dfe38L, "jetbrains.mps.lang.project.structure.MappingPriorityRule");
    /*package*/ static final SConcept MappingConfigExternalRef$4M = MetaAdapterFactory.getConcept(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x25c3f284595727e1L, "jetbrains.mps.lang.project.structure.MappingConfigExternalRef");
    /*package*/ static final SConcept MappingConfigNormalRef$Ae = MetaAdapterFactory.getConcept(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x25c3f28459572777L, "jetbrains.mps.lang.project.structure.MappingConfigNormalRef");
    /*package*/ static final SConcept MappingConfigRefAllGlobal$T_ = MetaAdapterFactory.getConcept(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x25c3f2845954f70fL, "jetbrains.mps.lang.project.structure.MappingConfigRefAllGlobal");
    /*package*/ static final SConcept MappingConfigRefAllLocal$QZ = MetaAdapterFactory.getConcept(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x25c3f284595702d4L, "jetbrains.mps.lang.project.structure.MappingConfigRefAllLocal");
    /*package*/ static final SConcept MappingConfigRefSet$Ta = MetaAdapterFactory.getConcept(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x25c3f2845957030bL, "jetbrains.mps.lang.project.structure.MappingConfigRefSet");
    /*package*/ static final SConcept GeneratorDescriptor$hF = MetaAdapterFactory.getConcept(0xf4ad079dbc714ffbL, 0x96009328705cf998L, 0x3663ebbd1bf10683L, "jetbrains.mps.lang.descriptor.structure.GeneratorDescriptor");
  }
}
