package jetbrains.mps.baseLanguage.regexp.generator.baseLanguage.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 org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.baseLanguage.regexp.constraints.RegexUtil;
import jetbrains.mps.baseLanguage.regexp.generator.baseLanguage.template.util.Flags;
import jetbrains.mps.generator.template.PropertyMacroContext;
import jetbrains.mps.baseLanguage.regexp.behavior.Regexp__BehaviorDescriptor;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import java.util.regex.Pattern;
import java.util.List;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import java.util.ArrayList;
import jetbrains.mps.baseLanguage.regexp.behavior.ReplaceRegexpOperation__BehaviorDescriptor;
import jetbrains.mps.generator.template.ReferenceMacroContext;
import jetbrains.mps.generator.template.IfMacroContext;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodeContext;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodesContext;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.internal.collections.runtime.IWhereFilter;
import jetbrains.mps.generator.template.MappingScriptContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SModelOperations;
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.ScriptCodeBlock;
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.InlineSwitchCaseCondition;
import jetbrains.mps.generator.template.InlineSwitchCaseContext;
import jetbrains.mps.generator.impl.query.ReferenceTargetQuery;
@Generated
public class QueriesGenerated extends QueryProviderBase {
public QueriesGenerated() {
super(1);
}
public static boolean baseMappingRule_Condition_2588298302277788537(final BaseMappingRuleContext _context) {
SNode ruc = SNodeOperations.getNodeAncestor(_context.getNode(), MetaAdapterFactory.getInterfaceConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, "jetbrains.mps.baseLanguage.regexp.structure.RegexpUsingConstruction"), false, false);
return SNodeOperations.isInstanceOf(ruc, MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ef3f72dL, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceWithRegexpExpression")) || SNodeOperations.isInstanceOf(ruc, MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c94680172L, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceWithRegexpOperation"));
}
public static boolean baseMappingRule_Condition_1222259398301(final BaseMappingRuleContext _context) {
return SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c942ab86bL, "jetbrains.mps.baseLanguage.regexp.structure.SplitOperation"));
}
public static boolean baseMappingRule_Condition_1222261187751(final BaseMappingRuleContext _context) {
return SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c94680172L, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceWithRegexpOperation"));
}
public static boolean baseMappingRule_Condition_1222261663847(final BaseMappingRuleContext _context) {
return SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c9466ae95L, "jetbrains.mps.baseLanguage.regexp.structure.MatchRegexpOperation"));
}
public static boolean baseMappingRule_Condition_3796137614137205667(final BaseMappingRuleContext _context) {
return SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceRegexpOperation"));
}
public static boolean baseMappingRule_Condition_4276824325038550474(final BaseMappingRuleContext _context) {
return RegexUtil.getRegexpIfContainer(_context.getNode()) != null;
}
public static boolean baseMappingRule_Condition_7048923897763033470(final BaseMappingRuleContext _context) {
boolean result = Flags.ADD_VARS.isFlagged(_context.getNode());
if (result) {
Flags.ADD_VARS.clear(_context.getNode());
}
return result;
}
public static Object propertyMacro_GetPropertyValue_6717546899049700876(final PropertyMacroContext _context) {
return (String) Regexp__BehaviorDescriptor.toString_idhEwIUjb.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117648961dL, 0x11176490e08L, "regexp")));
}
public static Object propertyMacro_GetPropertyValue_6717546899049700886(final PropertyMacroContext _context) {
int result = 0;
if (SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117648961dL, 0x1119ceddfe3L, "multiLine"))) {
result = result + Pattern.MULTILINE;
}
if (SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117648961dL, 0x1119cedcf38L, "dotAll"))) {
result = result + Pattern.DOTALL;
}
if (SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117648961dL, 0x1119cf15020L, "caseInsensitive"))) {
result = result + Pattern.CASE_INSENSITIVE;
}
return result;
}
public static Object propertyMacro_GetPropertyValue_1174655313358(final PropertyMacroContext _context) {
List<SNode> nodes = SNodeOperations.getNodeAncestors(_context.getNode(), MetaAdapterFactory.getInterfaceConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, "jetbrains.mps.baseLanguage.regexp.structure.RegexpUsingConstruction"), false);
return "_pattern_" + ListSequence.fromList(nodes).count();
}
public static Object propertyMacro_GetPropertyValue_1174655168104(final PropertyMacroContext _context) {
List<SNode> nodes = SNodeOperations.getNodeAncestors(_context.getNode(), MetaAdapterFactory.getInterfaceConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, "jetbrains.mps.baseLanguage.regexp.structure.RegexpUsingConstruction"), false);
return "_matcher_" + ListSequence.fromList(nodes).count();
}
public static Object propertyMacro_GetPropertyValue_1174658262046(final PropertyMacroContext _context) {
return _context.createUniqueName("_Replacer", _context.getNode());
}
public static Object propertyMacro_GetPropertyValue_1174659618559(final PropertyMacroContext _context) {
SNode parens = SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117987ff5eL, 0x11179881f99L, "match"));
SNode c = RegexUtil.findRegexpUsingConstructionFor(_context.getNode());
List<SNode> parensList = new ArrayList<SNode>();
Regexp__BehaviorDescriptor.getString_idhMuDF1A.invoke(SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(c, MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117648961dL, "jetbrains.mps.baseLanguage.regexp.structure.InlineRegexpExpression")), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117648961dL, 0x11176490e08L, "regexp")), parensList);
return 1 + ListSequence.fromList(parensList).indexOf(parens);
}
public static Object propertyMacro_GetPropertyValue_1175155526348(final PropertyMacroContext _context) {
List<SNode> nodes = SNodeOperations.getNodeAncestors(_context.getNode(), MetaAdapterFactory.getInterfaceConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, "jetbrains.mps.baseLanguage.regexp.structure.RegexpUsingConstruction"), false);
return "_pattern_" + ListSequence.fromList(nodes).count();
}
public static Object propertyMacro_GetPropertyValue_1175155558088(final PropertyMacroContext _context) {
List<SNode> nodes = SNodeOperations.getNodeAncestors(_context.getNode(), MetaAdapterFactory.getInterfaceConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, "jetbrains.mps.baseLanguage.regexp.structure.RegexpUsingConstruction"), false);
return "_matcher_" + ListSequence.fromList(nodes).count();
}
public static Object propertyMacro_GetPropertyValue_1175169642723(final PropertyMacroContext _context) {
List<SNode> nodes = SNodeOperations.getNodeAncestors(_context.getNode(), MetaAdapterFactory.getInterfaceConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, "jetbrains.mps.baseLanguage.regexp.structure.RegexpUsingConstruction"), false);
return "_pattern_" + ListSequence.fromList(nodes).count();
}
public static Object propertyMacro_GetPropertyValue_1175169648262(final PropertyMacroContext _context) {
List<SNode> nodes = SNodeOperations.getNodeAncestors(_context.getNode(), MetaAdapterFactory.getInterfaceConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, "jetbrains.mps.baseLanguage.regexp.structure.RegexpUsingConstruction"), false);
return "_matcher_" + ListSequence.fromList(nodes).count();
}
public static Object propertyMacro_GetPropertyValue_1175170026397(final PropertyMacroContext _context) {
SNode parens = SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117987ff5eL, 0x11179881f99L, "match"));
SNode c = RegexUtil.findRegexpUsingConstructionFor(_context.getNode());
List<SNode> parensList = new ArrayList<SNode>();
Regexp__BehaviorDescriptor.getString_idhMuDF1A.invoke(SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(c, MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117648961dL, "jetbrains.mps.baseLanguage.regexp.structure.InlineRegexpExpression")), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117648961dL, 0x11176490e08L, "regexp")), parensList);
return 1 + ListSequence.fromList(parensList).indexOf(parens);
}
public static Object propertyMacro_GetPropertyValue_7048923897763036419(final PropertyMacroContext _context) {
return _context.createUniqueName("_matcher_", SNodeOperations.getParent(_context.getNode()));
}
public static Object propertyMacro_GetPropertyValue_6717546899049792853(final PropertyMacroContext _context) {
return Regexp__BehaviorDescriptor.toString_idhEwIUjb.invoke(SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceRegexpOperation")), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, 0x34ae970c1924ee3bL, "search")));
}
public static Object propertyMacro_GetPropertyValue_6717546899049792866(final PropertyMacroContext _context) {
int result = 0;
SNode rro = SNodeOperations.cast(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceRegexpOperation"));
if (SPropertyOperations.getBoolean(rro, MetaAdapterFactory.getProperty(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, 0x34ae970c1924ee67L, "multiLine"))) {
result = result + Pattern.MULTILINE;
}
if (SPropertyOperations.getBoolean(rro, MetaAdapterFactory.getProperty(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, 0x34ae970c1924ee66L, "dotAll"))) {
result = result + Pattern.DOTALL;
}
if (SPropertyOperations.getBoolean(rro, MetaAdapterFactory.getProperty(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, 0x34ae970c1924ee68L, "caseInsensitive"))) {
result = result + Pattern.CASE_INSENSITIVE;
}
return result;
}
public static Object propertyMacro_GetPropertyValue_6717546899049792921(final PropertyMacroContext _context) {
return _context.createUniqueName("REPLREGEXP", null);
}
public static Object propertyMacro_GetPropertyValue_3796137614137206989(final PropertyMacroContext _context) {
return (String) ReplaceRegexpOperation__BehaviorDescriptor.getReplacementString_id3iI_KKp9qzv.invoke(SNodeOperations.cast(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceRegexpOperation")));
}
public static Object referenceMacro_GetReferent_1175170026388(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(RegexUtil.findRegexpUsingConstructionFor(_context.getNode()), "matcher");
}
public static Object referenceMacro_GetReferent_2512254891788090401(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "matcher");
}
public static Object referenceMacro_GetReferent_3796137614137206957(final ReferenceMacroContext _context) {
return (SPropertyOperations.getBoolean(SNodeOperations.cast(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceRegexpOperation")), MetaAdapterFactory.getProperty(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x34ae970c1923d18aL, 0x34ae970c1924ee69L, "globalReplace")) ? "replaceAll" : "replaceFirst");
}
public static boolean ifMacro_Condition_3731567766880801943(final IfMacroContext _context) {
return SNodeOperations.isInstanceOf(SNodeOperations.getParent(_context.getNode()), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b204L, "jetbrains.mps.baseLanguage.structure.ConstructorDeclaration")) && SNodeOperations.isInstanceOf(ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"))).first(), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x121119ae5ffL, "jetbrains.mps.baseLanguage.structure.ConstructorInvocationStatement"));
}
public static SNode sourceNodeQuery_3731567766880801972(final SourceSubstituteMacroNodeContext _context) {
return ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"))).first();
}
public static SNode sourceNodeQuery_1174512824855(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1174512909652(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11176652f14L, 0x11176678c5eL, "expr"));
}
public static SNode sourceNodeQuery_1174512937325(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11176652f14L, 0x1117665624aL, "body"));
}
public static SNode sourceNodeQuery_1174659183903(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ef3f72dL, 0x1117ef5b26bL, "expr"));
}
public static SNode sourceNodeQuery_6717546899049826137(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1174659237673(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ef3f72dL, 0x1117ef94e0cL, "replaceBlock"));
}
public static SNode sourceNodeQuery_1174658308251(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body"));
}
public static SNode sourceNodeQuery_1175155573909(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1175155635929(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1119caff72eL, 0x1119cb06facL, "expr"));
}
public static SNode sourceNodeQuery_1175155725139(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1119caff72eL, 0x1119cb172e6L, "body"));
}
public static SNode sourceNodeQuery_1175164955452(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1119d41c734L, 0x1119d425aa1L, "expr"));
}
public static SNode sourceNodeQuery_1175164958475(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1175169696431(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1175169704904(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1119d8807a3L, 0x1119d883fbcL, "expr"));
}
public static SNode sourceNodeQuery_1175169838691(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1119d8807a3L, 0x1119d8a3c40L, "body"));
}
public static SNode sourceNodeQuery_1179358309388(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1179358364442(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x112972a0c32L, 0x112972c11f2L, "inputExpression"));
}
public static SNode sourceNodeQuery_1222257141471(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand"));
}
public static SNode sourceNodeQuery_1222257141479(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c942ab86bL, "jetbrains.mps.baseLanguage.regexp.structure.SplitOperation")), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1222418938523(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand"));
}
public static SNode sourceNodeQuery_1222418914656(final SourceSubstituteMacroNodeContext _context) {
if ((SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")) == null) || !(SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c94680172L, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceWithRegexpOperation")))) {
return null;
}
return SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c94680172L, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceWithRegexpOperation")), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1222261273767(final SourceSubstituteMacroNodeContext _context) {
if ((SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")) == null) || !(SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c94680172L, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceWithRegexpOperation")))) {
return null;
}
return SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c94680172L, "jetbrains.mps.baseLanguage.regexp.structure.ReplaceWithRegexpOperation")), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c94680172L, 0x11c946f4847L, "replaceBlock"));
}
public static SNode sourceNodeQuery_1222261743052(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation")), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x11c9466ae95L, "jetbrains.mps.baseLanguage.regexp.structure.MatchRegexpOperation")), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_1222261743061(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand"));
}
public static SNode sourceNodeQuery_6129327962763257360(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_6129327962763258610(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x550fbf4ebc5de3f5L, 0x550fbf4ebc5f5df9L, "inputExpression"));
}
public static SNode sourceNodeQuery_4276824325038550656(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x1117ecbc07aL, 0x1117ecc427cL, "regexp"));
}
public static SNode sourceNodeQuery_4276824325038550665(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x550fbf4ebc5de3f5L, 0x550fbf4ebc5f5df9L, "inputExpression"));
}
public static SNode sourceNodeQuery_3796137614137206943(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand"));
}
public static Iterable<SNode> sourceNodesQuery_7048923897763033580(final SourceSubstituteMacroNodesContext _context) {
return ListSequence.fromList(SNodeOperations.getNodeDescendants(_context.getNode(), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x550fbf4ebc5de3f5L, "jetbrains.mps.baseLanguage.regexp.structure.FindMatchExpression"), false, new SAbstractConcept[]{})).where(new IWhereFilter<SNode>() {
public boolean accept(SNode it) {
return Flags.REGEXP_NEED_VAR.isFlagged(it);
}
});
}
public static Iterable<SNode> sourceNodesQuery_7048923897763033509(final SourceSubstituteMacroNodesContext _context) {
if (SNodeOperations.isInstanceOf(SNodeOperations.getParent(_context.getNode()), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b204L, "jetbrains.mps.baseLanguage.structure.ConstructorDeclaration")) && SNodeOperations.isInstanceOf(ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"))).first(), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x121119ae5ffL, "jetbrains.mps.baseLanguage.structure.ConstructorInvocationStatement"))) {
return ListSequence.fromList(SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"))).tailListSequence(1);
}
return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"));
}
public static void mappingScript_CodeBlock_7048923897762709815(final MappingScriptContext _context) {
for (SNode expr : SModelOperations.nodes(_context.getModel(), MetaAdapterFactory.getConcept(0xdaafa647f1f74b0bL, 0xb09669cd7c8408c0L, 0x550fbf4ebc5de3f5L, "jetbrains.mps.baseLanguage.regexp.structure.FindMatchExpression"))) {
SNode container = RegexUtil.getRegexpIfContainer(expr);
if (container != null) {
Flags.ADD_VARS.flag(SNodeOperations.getParent(container));
Flags.REGEXP_NEED_VAR.flag(expr);
}
}
}
private final Map<String, ReductionRuleCondition> rrcMethods = new HashMap<String, ReductionRuleCondition>();
{
int i = 0;
rrcMethods.put("1222259390002", new QueriesGenerated.RRC(i++));
rrcMethods.put("1222261179858", new QueriesGenerated.RRC(i++));
rrcMethods.put("1222261659032", new QueriesGenerated.RRC(i++));
rrcMethods.put("3796137614137203443", new QueriesGenerated.RRC(i++));
rrcMethods.put("7048923897763033468", 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_1222259398301(ctx);
case 1:
return QueriesGenerated.baseMappingRule_Condition_1222261187751(ctx);
case 2:
return QueriesGenerated.baseMappingRule_Condition_1222261663847(ctx);
case 3:
return QueriesGenerated.baseMappingRule_Condition_3796137614137205667(ctx);
case 4:
return QueriesGenerated.baseMappingRule_Condition_7048923897763033470(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, ScriptCodeBlock> mscbMethods = new HashMap<String, ScriptCodeBlock>();
{
int i = 0;
mscbMethods.put("7048923897762709814", new QueriesGenerated.SCB(i++));
}
@Override
@NotNull
public ScriptCodeBlock getScriptCodeBlock(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(mscbMethods.containsKey(id))) {
return super.getScriptCodeBlock(identity);
}
return mscbMethods.get(id);
}
private static class SCB implements ScriptCodeBlock {
private final int methodKey;
public SCB(int methodKey) {
this.methodKey = methodKey;
}
@Override
public void invoke(MappingScriptContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
QueriesGenerated.mappingScript_CodeBlock_7048923897762709815(ctx);
return;
default:
throw new GenerationFailureException(String.format("There's no code block with method index %d ", methodKey));
}
}
}
private final Map<String, SourceNodeQuery> snqMethods = new HashMap<String, SourceNodeQuery>();
{
int i = 0;
snqMethods.put("3731567766880801972", new QueriesGenerated.SNQ(i++));
snqMethods.put("1174512824855", new QueriesGenerated.SNQ(i++));
snqMethods.put("1174512909652", new QueriesGenerated.SNQ(i++));
snqMethods.put("1174512937325", new QueriesGenerated.SNQ(i++));
snqMethods.put("1174659183903", new QueriesGenerated.SNQ(i++));
snqMethods.put("6717546899049826137", new QueriesGenerated.SNQ(i++));
snqMethods.put("1174659237673", new QueriesGenerated.SNQ(i++));
snqMethods.put("1174658308251", new QueriesGenerated.SNQ(i++));
snqMethods.put("1175155573909", new QueriesGenerated.SNQ(i++));
snqMethods.put("1175155635929", new QueriesGenerated.SNQ(i++));
snqMethods.put("1175155725139", new QueriesGenerated.SNQ(i++));
snqMethods.put("1175164955452", new QueriesGenerated.SNQ(i++));
snqMethods.put("1175164958475", new QueriesGenerated.SNQ(i++));
snqMethods.put("1175169696431", new QueriesGenerated.SNQ(i++));
snqMethods.put("1175169704904", new QueriesGenerated.SNQ(i++));
snqMethods.put("1175169838691", new QueriesGenerated.SNQ(i++));
snqMethods.put("1179358309388", new QueriesGenerated.SNQ(i++));
snqMethods.put("1179358364442", new QueriesGenerated.SNQ(i++));
snqMethods.put("1222257141471", new QueriesGenerated.SNQ(i++));
snqMethods.put("1222257141479", new QueriesGenerated.SNQ(i++));
snqMethods.put("1222418938523", new QueriesGenerated.SNQ(i++));
snqMethods.put("1222418914656", new QueriesGenerated.SNQ(i++));
snqMethods.put("1222261273767", new QueriesGenerated.SNQ(i++));
snqMethods.put("1222261743052", new QueriesGenerated.SNQ(i++));
snqMethods.put("1222261743061", new QueriesGenerated.SNQ(i++));
snqMethods.put("6129327962763257360", new QueriesGenerated.SNQ(i++));
snqMethods.put("6129327962763258610", new QueriesGenerated.SNQ(i++));
snqMethods.put("4276824325038550656", new QueriesGenerated.SNQ(i++));
snqMethods.put("4276824325038550665", new QueriesGenerated.SNQ(i++));
snqMethods.put("3796137614137206943", 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_3731567766880801972(ctx);
case 1:
return QueriesGenerated.sourceNodeQuery_1174512824855(ctx);
case 2:
return QueriesGenerated.sourceNodeQuery_1174512909652(ctx);
case 3:
return QueriesGenerated.sourceNodeQuery_1174512937325(ctx);
case 4:
return QueriesGenerated.sourceNodeQuery_1174659183903(ctx);
case 5:
return QueriesGenerated.sourceNodeQuery_6717546899049826137(ctx);
case 6:
return QueriesGenerated.sourceNodeQuery_1174659237673(ctx);
case 7:
return QueriesGenerated.sourceNodeQuery_1174658308251(ctx);
case 8:
return QueriesGenerated.sourceNodeQuery_1175155573909(ctx);
case 9:
return QueriesGenerated.sourceNodeQuery_1175155635929(ctx);
case 10:
return QueriesGenerated.sourceNodeQuery_1175155725139(ctx);
case 11:
return QueriesGenerated.sourceNodeQuery_1175164955452(ctx);
case 12:
return QueriesGenerated.sourceNodeQuery_1175164958475(ctx);
case 13:
return QueriesGenerated.sourceNodeQuery_1175169696431(ctx);
case 14:
return QueriesGenerated.sourceNodeQuery_1175169704904(ctx);
case 15:
return QueriesGenerated.sourceNodeQuery_1175169838691(ctx);
case 16:
return QueriesGenerated.sourceNodeQuery_1179358309388(ctx);
case 17:
return QueriesGenerated.sourceNodeQuery_1179358364442(ctx);
case 18:
return QueriesGenerated.sourceNodeQuery_1222257141471(ctx);
case 19:
return QueriesGenerated.sourceNodeQuery_1222257141479(ctx);
case 20:
return QueriesGenerated.sourceNodeQuery_1222418938523(ctx);
case 21:
return QueriesGenerated.sourceNodeQuery_1222418914656(ctx);
case 22:
return QueriesGenerated.sourceNodeQuery_1222261273767(ctx);
case 23:
return QueriesGenerated.sourceNodeQuery_1222261743052(ctx);
case 24:
return QueriesGenerated.sourceNodeQuery_1222261743061(ctx);
case 25:
return QueriesGenerated.sourceNodeQuery_6129327962763257360(ctx);
case 26:
return QueriesGenerated.sourceNodeQuery_6129327962763258610(ctx);
case 27:
return QueriesGenerated.sourceNodeQuery_4276824325038550656(ctx);
case 28:
return QueriesGenerated.sourceNodeQuery_4276824325038550665(ctx);
case 29:
return QueriesGenerated.sourceNodeQuery_3796137614137206943(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("7048923897763033580", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("7048923897763033509", 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_7048923897763033580(ctx));
case 1:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_7048923897763033509(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("6717546899049700875", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), ""));
pvqMethods.put("6717546899049700885", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "0"));
pvqMethods.put("1174655313357", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "pattern"));
pvqMethods.put("1174655168103", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "matcher"));
pvqMethods.put("1174658262045", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "ReplacerTemplate"));
pvqMethods.put("1174659618558", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "23"));
pvqMethods.put("1175155526347", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "_pattern"));
pvqMethods.put("1175155558087", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "_matcher"));
pvqMethods.put("1175169642722", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "_pattern"));
pvqMethods.put("1175169648261", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "_matcher"));
pvqMethods.put("1175170026396", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "23"));
pvqMethods.put("7048923897763036418", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "matcher"));
pvqMethods.put("6717546899049792852", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), "text"));
pvqMethods.put("6717546899049792865", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "0"));
pvqMethods.put("6717546899049792920", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1204d897032L, 0x1204d89aadaL, "fieldName"), "aa"));
pvqMethods.put("3796137614137206988", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), ""));
}
@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_6717546899049700876(ctx);
case 1:
return QueriesGenerated.propertyMacro_GetPropertyValue_6717546899049700886(ctx);
case 2:
return QueriesGenerated.propertyMacro_GetPropertyValue_1174655313358(ctx);
case 3:
return QueriesGenerated.propertyMacro_GetPropertyValue_1174655168104(ctx);
case 4:
return QueriesGenerated.propertyMacro_GetPropertyValue_1174658262046(ctx);
case 5:
return QueriesGenerated.propertyMacro_GetPropertyValue_1174659618559(ctx);
case 6:
return QueriesGenerated.propertyMacro_GetPropertyValue_1175155526348(ctx);
case 7:
return QueriesGenerated.propertyMacro_GetPropertyValue_1175155558088(ctx);
case 8:
return QueriesGenerated.propertyMacro_GetPropertyValue_1175169642723(ctx);
case 9:
return QueriesGenerated.propertyMacro_GetPropertyValue_1175169648262(ctx);
case 10:
return QueriesGenerated.propertyMacro_GetPropertyValue_1175170026397(ctx);
case 11:
return QueriesGenerated.propertyMacro_GetPropertyValue_7048923897763036419(ctx);
case 12:
return QueriesGenerated.propertyMacro_GetPropertyValue_6717546899049792853(ctx);
case 13:
return QueriesGenerated.propertyMacro_GetPropertyValue_6717546899049792866(ctx);
case 14:
return QueriesGenerated.propertyMacro_GetPropertyValue_6717546899049792921(ctx);
case 15:
return QueriesGenerated.propertyMacro_GetPropertyValue_3796137614137206989(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("3731567766880801942", 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_3731567766880801943(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, InlineSwitchCaseCondition> isccMethods = new HashMap<String, InlineSwitchCaseCondition>();
{
int i = 0;
isccMethods.put("2588298302277788536", new QueriesGenerated.ISCC(i++));
isccMethods.put("4276824325038550473", new QueriesGenerated.ISCC(i++));
}
@NotNull
@Override
public InlineSwitchCaseCondition getInlineSwitchCaseCondition(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(isccMethods.containsKey(id))) {
return super.getInlineSwitchCaseCondition(identity);
}
return isccMethods.get(id);
}
private static class ISCC implements InlineSwitchCaseCondition {
private final int methodKey;
public ISCC(int methodKey) {
this.methodKey = methodKey;
}
@Override
public boolean check(@NotNull InlineSwitchCaseContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.baseMappingRule_Condition_2588298302277788537(ctx);
case 1:
return QueriesGenerated.baseMappingRule_Condition_4276824325038550474(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no condition method for inline switch's case %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, ReferenceTargetQuery> rtqMethods = new HashMap<String, ReferenceTargetQuery>();
{
rtqMethods.put("1175170026387", new QueriesGenerated.RTQ(0, "matcher"));
rtqMethods.put("2512254891788090400", new QueriesGenerated.RTQ(1, "m"));
rtqMethods.put("3796137614137206956", new QueriesGenerated.RTQ(2, "replaceFirst"));
}
@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_1175170026388(ctx);
case 1:
return QueriesGenerated.referenceMacro_GetReferent_2512254891788090401(ctx);
case 2:
return QueriesGenerated.referenceMacro_GetReferent_3796137614137206957(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
}