package jetbrains.mps.lang.descriptor.generator.template.main; /*Generated by MPS */ import jetbrains.mps.generator.runtime.Generated; import jetbrains.mps.generator.runtime.TemplateModelBase; import jetbrains.mps.generator.runtime.TemplateModel; import java.util.Collection; import jetbrains.mps.generator.runtime.TemplateMappingConfiguration; import jetbrains.mps.generator.runtime.TemplateSwitchMapping; import org.jetbrains.mps.openapi.model.SModelReference; import jetbrains.mps.generator.runtime.TemplateModule; import jetbrains.mps.generator.runtime.TemplateUtil; import org.jetbrains.mps.openapi.persistence.PersistenceFacade; import jetbrains.mps.generator.runtime.TemplateDeclaration; import org.jetbrains.mps.openapi.model.SNodeReference; import jetbrains.mps.smodel.SNodePointer; import jetbrains.mps.generator.impl.query.GeneratorQueryProvider; @Generated public class TemplateModelImpl extends TemplateModelBase implements TemplateModel { private final Collection<TemplateMappingConfiguration> mappings; private final Collection<TemplateSwitchMapping> switches; private final SModelReference model; public TemplateModelImpl(TemplateModule module) { super(module); mappings = TemplateUtil.<TemplateMappingConfiguration>asCollection(new Mapping_GeneratorModule(this), new Mapping_LanguageModule(this)); switches = TemplateUtil.<TemplateSwitchMapping>asCollection(new Switch_InstantiateAspectDescriptor()); model = PersistenceFacade.getInstance().createModelReference("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)"); } public String getLongName() { return "jetbrains.mps.lang.descriptor.generator.template.main"; } public SModelReference getSModelReference() { return model; } public Collection<TemplateMappingConfiguration> getConfigurations() { return mappings; } public Collection<TemplateSwitchMapping> getSwitches() { return switches; } public TemplateDeclaration loadTemplate(SNodeReference template, Object... arguments) { if (!(model.equals(template.getModelReference()))) { return null; } if (template.equals(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "263208052639697475"))) { TemplateUtil.assertTemplateParametersCount(template, 0, arguments.length); return new Template_GeneratorRuntime(); } if (template.equals(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "9020561928507177266"))) { TemplateUtil.assertTemplateParametersCount(template, 0, arguments.length); return new Template_Language(); } if (template.equals(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1698302279987411125"))) { TemplateUtil.assertTemplateParametersCount(template, 0, arguments.length); return new Template_language_descriptor(); } if (template.equals(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "263208052639617419"))) { TemplateUtil.assertTemplateParametersCount(template, 0, arguments.length); return new Template_generator_descriptor(); } if (template.equals(new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "263208052639692929"))) { TemplateUtil.assertTemplateParametersCount(template, 0, arguments.length); return new Template_GDClass(); } return null; } @Override public GeneratorQueryProvider getQueryProvider() { return reflectiveProvider(QueriesGenerated.class); } }