package jetbrains.mps.baseLanguage.constructors.generator.template.main;
/*Generated by MPS */
import jetbrains.mps.generator.runtime.Generated;
import jetbrains.mps.generator.impl.query.QueryProviderBase;
import jetbrains.mps.generator.template.BaseMappingRuleContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.generator.template.PropertyMacroContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import jetbrains.mps.lang.core.behavior.INamedConcept__BehaviorDescriptor;
import jetbrains.mps.generator.template.ReferenceMacroContext;
import jetbrains.mps.generator.template.IfMacroContext;
import jetbrains.mps.typesystem.inference.TypeChecker;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodeContext;
import jetbrains.mps.lang.typesystem.runtime.HUtil;
import jetbrains.mps.baseLanguage.behavior.Type__BehaviorDescriptor;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodesContext;
import java.util.Map;
import jetbrains.mps.generator.impl.query.ReductionRuleCondition;
import java.util.HashMap;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.generator.impl.query.QueryKey;
import jetbrains.mps.generator.template.ReductionRuleQueryContext;
import jetbrains.mps.generator.impl.GenerationFailureException;
import jetbrains.mps.generator.impl.query.SourceNodeQuery;
import jetbrains.mps.generator.impl.query.QueryKeyImpl;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.generator.impl.query.SourceNodesQuery;
import java.util.Collection;
import jetbrains.mps.util.IterableUtil;
import jetbrains.mps.generator.impl.query.PropertyValueQuery;
import org.jetbrains.mps.openapi.language.SProperty;
import jetbrains.mps.generator.impl.query.IfMacroCondition;
import jetbrains.mps.generator.impl.query.ReferenceTargetQuery;
@Generated
public class QueriesGenerated extends QueryProviderBase {
public QueriesGenerated() {
super(1);
}
public static boolean baseMappingRule_Condition_4563030478605919789(final BaseMappingRuleContext _context) {
return SNodeOperations.isInstanceOf(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c2L, 0x4aa85872b7431817L, "arguments")), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, "jetbrains.mps.baseLanguage.constructors.structure.ListArgumentsClause"));
}
public static boolean baseMappingRule_Condition_7738355964682569232(final BaseMappingRuleContext _context) {
return !(SNodeOperations.isInstanceOf(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c2L, 0x4aa85872b7431817L, "arguments")), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, "jetbrains.mps.baseLanguage.constructors.structure.ListArgumentsClause")));
}
public static Object propertyMacro_GetPropertyValue_3361165003578605393(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object propertyMacro_GetPropertyValue_3361165003578773248(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object propertyMacro_GetPropertyValue_606143069297663192(final PropertyMacroContext _context) {
return (String) INamedConcept__BehaviorDescriptor.getFqName_idhEwIO9y.invoke(SNodeOperations.cast(SNodeOperations.getParent(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor"))), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c1L, "jetbrains.mps.baseLanguage.constructors.structure.CustomConstructorContainer")));
}
public static Object propertyMacro_GetPropertyValue_606143069297663234(final PropertyMacroContext _context) {
return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object propertyMacro_GetPropertyValue_4739047193854099886(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object propertyMacro_GetPropertyValue_4563030478605372023(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object propertyMacro_GetPropertyValue_7738355964682458480(final PropertyMacroContext _context) {
return (String) INamedConcept__BehaviorDescriptor.getFqName_idhEwIO9y.invoke(SNodeOperations.cast(SNodeOperations.getParent(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor"))), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c1L, "jetbrains.mps.baseLanguage.constructors.structure.CustomConstructorContainer")));
}
public static Object propertyMacro_GetPropertyValue_7738355964682458492(final PropertyMacroContext _context) {
return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object referenceMacro_GetReferent_4563030478605788432(final ReferenceMacroContext _context) {
return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b745ce64L, 0x4aa85872b745ce65L, "parameter")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static boolean ifMacro_Condition_4563030478605217770(final IfMacroContext _context) {
return true;
}
public static boolean ifMacro_Condition_7451562887563468786(final IfMacroContext _context) {
return SNodeOperations.isInstanceOf(TypeChecker.getInstance().getTypeOf(_context.getNode()), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10f0ad8bde4L, "jetbrains.mps.baseLanguage.structure.PrimitiveType"));
}
public static SNode sourceNodeQuery_4739047193854690302(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, 0x41c47a507380d0bcL, "list"));
}
public static SNode sourceNodeQuery_3361165003578773217(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c2L, 0x2e373c3e4b60e013L, "returnType"));
}
public static SNode sourceNodeQuery_3361165003578773233(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body"));
}
public static SNode sourceNodeQuery_4563030478604064810(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c2L, 0x4aa85872b7431817L, "arguments"));
}
public static SNode sourceNodeQuery_7451562887563468798(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(SLinkOperations.getTarget(SNodeOperations.cast(SNodeOperations.getParent(_context.getNode()), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, "jetbrains.mps.baseLanguage.constructors.structure.CustomConstructorUsage")), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c2L, 0x4aa85872b7431817L, "arguments")), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, "jetbrains.mps.baseLanguage.constructors.structure.ListArgumentsClause")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, 0x41c47a507380d0bcL, "list")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b7431819L, 0x4aa85872b7433028L, "type"));
}
public static SNode sourceNodeQuery_7451562887563468815(final SourceSubstituteMacroNodeContext _context) {
return TypeChecker.getInstance().getRuntimeSupport().coerce_(SLinkOperations.getTarget(SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(SLinkOperations.getTarget(SNodeOperations.cast(SNodeOperations.getParent(_context.getNode()), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, "jetbrains.mps.baseLanguage.constructors.structure.CustomConstructorUsage")), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c2L, 0x4aa85872b7431817L, "arguments")), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, "jetbrains.mps.baseLanguage.constructors.structure.ListArgumentsClause")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, 0x41c47a507380d0bcL, "list")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b7431819L, 0x4aa85872b7433028L, "type")), HUtil.createMatchingPatternByConcept(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10f0ad8bde4L, "jetbrains.mps.baseLanguage.structure.PrimitiveType")), true);
}
public static SNode sourceNodeQuery_7451562887563468852(final SourceSubstituteMacroNodeContext _context) {
return (SNode) Type__BehaviorDescriptor.getBoxedType_idhEwIzNC.invoke(SLinkOperations.getTarget(SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71b3L, "customConstructor")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c2L, 0x4aa85872b7431817L, "arguments")), MetaAdapterFactory.getConcept(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, "jetbrains.mps.baseLanguage.constructors.structure.ListArgumentsClause")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6b9L, 0x41c47a507380d0bcL, "list")), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b7431819L, 0x4aa85872b7433028L, "type")));
}
public static SNode sourceNodeQuery_4563030478604494220(final SourceSubstituteMacroNodeContext _context) {
return (SNode) Type__BehaviorDescriptor.getBoxedType_idhEwIzNC.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b7431819L, 0x4aa85872b7433028L, "type")));
}
public static SNode sourceNodeQuery_4563030478605372033(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b7431819L, 0x4aa85872b7433028L, "type"));
}
public static Iterable<SNode> sourceNodesQuery_4563030478605194153(final SourceSubstituteMacroNodesContext _context) {
return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x4aa85872b742b6baL, 0x4aa85872b7431821L, "parameter"));
}
public static Iterable<SNode> sourceNodesQuery_3361165003578749619(final SourceSubstituteMacroNodesContext _context) {
return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x7500da2cf0943c1L, 0x2a36c1b072f3e746L, "constructors"));
}
public static Iterable<SNode> sourceNodesQuery_7451562887563468840(final SourceSubstituteMacroNodesContext _context) {
return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71c0L, "element"));
}
public static Iterable<SNode> sourceNodesQuery_7738355964682834053(final SourceSubstituteMacroNodesContext _context) {
return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xae47ad35abd486cL, 0xac0f298884f39393L, 0x5ea800dcf8ca1ca6L, 0x5ea800dcf8cc71c0L, "element"));
}
private final Map<String, ReductionRuleCondition> rrcMethods = new HashMap<String, ReductionRuleCondition>();
{
int i = 0;
rrcMethods.put("606143069297301479", new QueriesGenerated.RRC(i++));
rrcMethods.put("7738355964682567554", new QueriesGenerated.RRC(i++));
}
@Override
@NotNull
public ReductionRuleCondition getReductionRuleCondition(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(rrcMethods.containsKey(id))) {
return super.getReductionRuleCondition(identity);
}
return rrcMethods.get(id);
}
private static class RRC implements ReductionRuleCondition {
private final int methodKey;
public RRC(int methodKey) {
this.methodKey = methodKey;
}
@Override
public boolean check(ReductionRuleQueryContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.baseMappingRule_Condition_4563030478605919789(ctx);
case 1:
return QueriesGenerated.baseMappingRule_Condition_7738355964682569232(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no condition method for rule %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, SourceNodeQuery> snqMethods = new HashMap<String, SourceNodeQuery>();
{
int i = 0;
snqMethods.put("4739047193854690302", new QueriesGenerated.SNQ(i++));
snqMethods.put("3361165003578773217", new QueriesGenerated.SNQ(i++));
snqMethods.put("3361165003578773233", new QueriesGenerated.SNQ(i++));
snqMethods.put("4563030478604064810", new QueriesGenerated.SNQ(i++));
snqMethods.put("7451562887563468798", new QueriesGenerated.SNQ(i++));
snqMethods.put("7451562887563468815", new QueriesGenerated.SNQ(i++));
snqMethods.put("7451562887563468852", new QueriesGenerated.SNQ(i++));
snqMethods.put("4563030478604494220", new QueriesGenerated.SNQ(i++));
snqMethods.put("4563030478605372033", new QueriesGenerated.SNQ(i++));
}
@NotNull
@Override
public SourceNodeQuery getSourceNodeQuery(@NotNull QueryKey identity) {
final String id = ((QueryKeyImpl) identity).getQueryNodeId().toString();
if (!(snqMethods.containsKey(id))) {
return super.getSourceNodeQuery(identity);
}
return snqMethods.get(id);
}
private static class SNQ implements SourceNodeQuery {
private final int methodKey;
public SNQ(int methodKey) {
this.methodKey = methodKey;
}
@Nullable
public SNode evaluate(@NotNull SourceSubstituteMacroNodeContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.sourceNodeQuery_4739047193854690302(ctx);
case 1:
return QueriesGenerated.sourceNodeQuery_3361165003578773217(ctx);
case 2:
return QueriesGenerated.sourceNodeQuery_3361165003578773233(ctx);
case 3:
return QueriesGenerated.sourceNodeQuery_4563030478604064810(ctx);
case 4:
return QueriesGenerated.sourceNodeQuery_7451562887563468798(ctx);
case 5:
return QueriesGenerated.sourceNodeQuery_7451562887563468815(ctx);
case 6:
return QueriesGenerated.sourceNodeQuery_7451562887563468852(ctx);
case 7:
return QueriesGenerated.sourceNodeQuery_4563030478604494220(ctx);
case 8:
return QueriesGenerated.sourceNodeQuery_4563030478605372033(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, SourceNodesQuery> snsqMethods = new HashMap<String, SourceNodesQuery>();
{
int i = 0;
snsqMethods.put("4563030478605194153", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("3361165003578749619", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("7451562887563468840", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("7738355964682834053", new QueriesGenerated.SNsQ(i++));
}
@NotNull
@Override
public SourceNodesQuery getSourceNodesQuery(@NotNull QueryKey identity) {
final String id = ((QueryKeyImpl) identity).getQueryNodeId().toString();
if (!(snsqMethods.containsKey(id))) {
return super.getSourceNodesQuery(identity);
}
return snsqMethods.get(id);
}
private static class SNsQ implements SourceNodesQuery {
private final int methodKey;
public SNsQ(int methodKey) {
this.methodKey = methodKey;
}
@NotNull
public Collection<SNode> evaluate(@NotNull SourceSubstituteMacroNodesContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4563030478605194153(ctx));
case 1:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_3361165003578749619(ctx));
case 2:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_7451562887563468840(ctx));
case 3:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_7738355964682834053(ctx));
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, PropertyValueQuery> pvqMethods = new HashMap<String, PropertyValueQuery>();
{
int i = 0;
pvqMethods.put("3361165003578605392", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "CustomCunstructorContainerImpl"));
pvqMethods.put("3361165003578773247", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "f"));
pvqMethods.put("606143069297663191", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x1115767a8eeL, "fqClassName"), "classFQName"));
pvqMethods.put("606143069297663233", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x111576710b3L, "methodName"), "methodName"));
pvqMethods.put("4739047193854099885", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "elements"));
pvqMethods.put("4563030478605372022", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "a"));
pvqMethods.put("7738355964682458479", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x1115767a8eeL, "fqClassName"), "classFQName"));
pvqMethods.put("7738355964682458491", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x111576710b3L, "methodName"), "methodName"));
}
@NotNull
@Override
public PropertyValueQuery getPropertyValueQuery(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(pvqMethods.containsKey(id))) {
return super.getPropertyValueQuery(identity);
}
return pvqMethods.get(id);
}
private static class PVQ extends PropertyValueQuery.Base {
private final int methodKey;
/*package*/ PVQ(int methodKey, SProperty property, String templateValue) {
super(property, templateValue);
this.methodKey = methodKey;
}
@Nullable
public Object evaluate(@NotNull PropertyMacroContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.propertyMacro_GetPropertyValue_3361165003578605393(ctx);
case 1:
return QueriesGenerated.propertyMacro_GetPropertyValue_3361165003578773248(ctx);
case 2:
return QueriesGenerated.propertyMacro_GetPropertyValue_606143069297663192(ctx);
case 3:
return QueriesGenerated.propertyMacro_GetPropertyValue_606143069297663234(ctx);
case 4:
return QueriesGenerated.propertyMacro_GetPropertyValue_4739047193854099886(ctx);
case 5:
return QueriesGenerated.propertyMacro_GetPropertyValue_4563030478605372023(ctx);
case 6:
return QueriesGenerated.propertyMacro_GetPropertyValue_7738355964682458480(ctx);
case 7:
return QueriesGenerated.propertyMacro_GetPropertyValue_7738355964682458492(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, IfMacroCondition> imcMethods = new HashMap<String, IfMacroCondition>();
{
int i = 0;
imcMethods.put("4563030478605217769", new QueriesGenerated.IfMC(i++));
imcMethods.put("7451562887563468785", new QueriesGenerated.IfMC(i++));
}
@NotNull
@Override
public IfMacroCondition getIfMacroCondition(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(imcMethods.containsKey(id))) {
return super.getIfMacroCondition(identity);
}
return imcMethods.get(id);
}
private static class IfMC implements IfMacroCondition {
private final int methodKey;
public IfMC(int methodKey) {
this.methodKey = methodKey;
}
@Override
public boolean check(@NotNull IfMacroContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.ifMacro_Condition_4563030478605217770(ctx);
case 1:
return QueriesGenerated.ifMacro_Condition_7451562887563468786(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no condition method for if macro %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, ReferenceTargetQuery> rtqMethods = new HashMap<String, ReferenceTargetQuery>();
{
rtqMethods.put("4563030478605788431", new QueriesGenerated.RTQ(0, null));
}
@NotNull
@Override
public ReferenceTargetQuery getReferenceTargetQuery(@NotNull QueryKey queryKey) {
final String id = queryKey.getTemplateNode().getNodeId().toString();
if (!(rtqMethods.containsKey(id))) {
return super.getReferenceTargetQuery(queryKey);
}
return rtqMethods.get(id);
}
private static class RTQ extends ReferenceTargetQuery.Base {
private final int methodKey;
/*package*/ RTQ(int methodKey, String templateValue) {
super(templateValue);
this.methodKey = methodKey;
}
@Nullable
public Object evaluate(@NotNull ReferenceMacroContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.referenceMacro_GetReferent_4563030478605788432(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
}