package jetbrains.mps.baseLanguage.javastub; /*Generated by MPS */ import org.apache.log4j.Logger; import org.apache.log4j.LogManager; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.java.stub.ReferenceFactory; import jetbrains.mps.baseLanguage.javastub.asm.ASMClass; import jetbrains.mps.stubs.javastub.classpath.ClassifierKind; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.smodel.behaviour.BHReflection; import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.baseLanguage.javastub.asm.ASMTypeVariable; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.baseLanguage.javastub.asm.ASMFormalTypeParameter; import jetbrains.mps.baseLanguage.javastub.asm.ASMType; import org.apache.log4j.Level; import jetbrains.mps.baseLanguage.javastub.asm.ASMMethod; import java.util.Map; import jetbrains.mps.internal.collections.runtime.MapSequence; import java.util.HashMap; import jetbrains.mps.internal.collections.runtime.IWhereFilter; import jetbrains.mps.baseLanguage.javastub.asm.ASMAnnotation; import jetbrains.mps.baseLanguage.javastub.asm.ASMField; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SConceptOperations; import java.util.List; import java.util.Iterator; import jetbrains.mps.baseLanguage.javastub.asm.ASMClassType; import jetbrains.mps.internal.collections.runtime.ISelector; import jetbrains.mps.baseLanguage.javastub.asm.ASMPrimitiveType; import jetbrains.mps.internal.collections.runtime.Sequence; import jetbrains.mps.internal.collections.runtime.ArrayUtils; import jetbrains.mps.baseLanguage.javastub.asm.ASMEnumValue; import jetbrains.mps.baseLanguage.javastub.asm.ASMArrayType; import jetbrains.mps.baseLanguage.javastub.asm.ASMVarArgType; import jetbrains.mps.baseLanguage.javastub.asm.ASMParameterizedType; import jetbrains.mps.baseLanguage.javastub.asm.ASMExtendsType; import jetbrains.mps.baseLanguage.javastub.asm.ASMSuperType; import jetbrains.mps.baseLanguage.javastub.asm.ASMUnboundedType; import java.util.ArrayList; import org.jetbrains.mps.openapi.language.SReferenceLink; import jetbrains.mps.util.NodeNameUtil; import jetbrains.mps.util.NameUtil; import org.jetbrains.mps.openapi.model.SNodeId; import org.jetbrains.mps.openapi.model.SReference; import org.jetbrains.mps.openapi.persistence.PersistenceFacade; import jetbrains.mps.smodel.SModelUtil_new; import org.jetbrains.mps.openapi.model.SNodeAccessUtil; import org.jetbrains.mps.openapi.model.SModel; import jetbrains.mps.lang.typesystem.runtime.HUtil; public class ClassifierUpdater { private static final Logger LOG = LogManager.getLogger(ClassifierUpdater.class); private SNode myClassifier; private final boolean mySkipPrivate; private final ReferenceFactory myHandler; private final ASMClass myParsedClass; public ClassifierUpdater(ASMClass asmClass, boolean skipPrivate, ReferenceFactory handler) { // we treat skipPrivate here as 'hide implementation details', thus only public and protected // members are visible if skipPrivate == true (i.e. those visible to outer code) mySkipPrivate = skipPrivate; myHandler = handler; myParsedClass = asmClass; } public void update(SNode c) { myClassifier = c; ClassifierKind kind = myParsedClass.getClassifierKind(); switch (kind) { case CLASS: initClass(SNodeOperations.cast(c, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept"))); return; case INTERFACE: initInterface(SNodeOperations.cast(c, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101edd46144L, "jetbrains.mps.baseLanguage.structure.Interface"))); return; case ENUM: initClass(SNodeOperations.cast(c, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfc367070a5L, "jetbrains.mps.baseLanguage.structure.EnumClass"))); return; case ANNOTATIONS: initAnnotation(SNodeOperations.cast(c, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a69dc80cL, "jetbrains.mps.baseLanguage.structure.Annotation"))); return; default: } } private void initAnnotation(SNode annotation) { updateAnnotationMethods(annotation); updateAnnotations(annotation); updateVisibility(); } private void initClass(SNode cls) { SPropertyOperations.set(cls, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, 0xfa5cee6dfaL, "abstractClass"), "" + (myParsedClass.isAbstract())); updateAnnotations(cls); if (myParsedClass.isDeprecated()) { BHReflection.invoke(SNodeOperations.asSConcept(SNodeOperations.getConcept(cls)), SMethodTrimmedId.create("markLoadedNodeAsDeprecated", MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept"), "5H8W9_EDlcn"), cls); } SPropertyOperations.set(cls, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, 0x11c6af4b284L, "isFinal"), "" + (myParsedClass.isFinal())); updateTypeVariables(cls); updateExtendsAndImplements(cls); updateInstanceFields(cls); updateStaticFields(cls); updateConstructors(cls); updateInstanceMethods(cls); updateStaticMethods(cls); updateVisibility(); } private void initInterface(SNode intfc) { updateAnnotations(intfc); if (myParsedClass.isDeprecated()) { BHReflection.invoke(SNodeOperations.asSConcept(SNodeOperations.getConcept(intfc)), SMethodTrimmedId.create("markLoadedNodeAsDeprecated", MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101edd46144L, "jetbrains.mps.baseLanguage.structure.Interface"), "5H8W9_EDv7w"), intfc); } updateTypeVariables(intfc); updateExtendsForInterface(intfc); updateStaticFields(intfc); updateInstanceMethods(intfc); updateStaticMethods(intfc); updateVisibility(); } private void updateVisibility() { if (SLinkOperations.getTarget(myClassifier, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility")) == null) { // for inner classes, visibility and other access fields is initialized at creation time SLinkOperations.setTarget(myClassifier, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility"), (myParsedClass.isPublic() ? createPublicVisibility_ol94f8_a0a1a0a21() : null)); } } private void updateTypeVariables(SNode result) { for (ASMTypeVariable tv : myParsedClass.getTypeParameters()) { SNode tvd = _quotation_createNode_ol94f8_a0a0a0o(tv.getName()); ListSequence.fromList(SLinkOperations.getChildren(result, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x102463b447aL, 0x102463bb98eL, "typeVariableDeclaration"))).addElement(tvd); if (tv instanceof ASMFormalTypeParameter) { ASMFormalTypeParameter tp = (ASMFormalTypeParameter) tv; if (tp.getClassBound() != null) { SLinkOperations.setTarget(tvd, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x1024639ed74L, 0x11ae375bda0L, "bound"), getTypeByASMType(tp.getClassBound(), null, result)); } for (ASMType act : tp.getInterfaceBounds()) { SNode typeByASMType = getTypeByASMType(act, null, result); if (SNodeOperations.isInstanceOf(typeByASMType, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType"))) { ListSequence.fromList(SLinkOperations.getChildren(tvd, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x1024639ed74L, 0x11ae913a476L, "auxBounds"))).addElement(SNodeOperations.cast(typeByASMType, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType"))); } else { // TODO: avoid this quick fix for SchemeProcessor class in scheme.kt from IDEA platform if (LOG.isEnabledFor(Level.WARN)) { LOG.warn("ClassifierType was expected, but received: " + typeByASMType + " when parsing the " + myClassifier); } } } } } } private void updateTypeVariables(ASMMethod method, SNode result, SNode cls) { Map<ASMTypeVariable, SNode> typeVars = MapSequence.fromMap(new HashMap<ASMTypeVariable, SNode>()); for (ASMTypeVariable tv : method.getTypeParameters()) { SNode tvd = _quotation_createNode_ol94f8_a0a0b0p(tv.getName()); ListSequence.fromList(SLinkOperations.getChildren(result, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x102463b447aL, 0x102463bb98eL, "typeVariableDeclaration"))).addElement(tvd); MapSequence.fromMap(typeVars).put(tv, tvd); } for (ASMTypeVariable tv : method.getTypeParameters()) { SNode tvd = MapSequence.fromMap(typeVars).get(tv); if (tv instanceof ASMFormalTypeParameter) { ASMFormalTypeParameter tp = (ASMFormalTypeParameter) tv; if (tp.getClassBound() != null) { SLinkOperations.setTarget(tvd, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x1024639ed74L, 0x11ae375bda0L, "bound"), getTypeByASMType(tp.getClassBound(), result, cls)); } for (ASMType act : tp.getInterfaceBounds()) { SNode typeByASMType = getTypeByASMType(act, result, cls); if (SNodeOperations.isInstanceOf(typeByASMType, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType"))) { ListSequence.fromList(SLinkOperations.getChildren(tvd, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x1024639ed74L, 0x11ae913a476L, "auxBounds"))).addElement(SNodeOperations.cast(typeByASMType, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType"))); } else { // TODO: avoid this quick fix for SchemeProcessor class in scheme.kt from IDEA platform if (LOG.isEnabledFor(Level.WARN)) { LOG.warn("ClassifierType was expected, but received: " + typeByASMType); } } } } } } private SNode findTypeVariableDeclaration(SNode genDecl, final String name) { return ListSequence.fromList(SLinkOperations.getChildren(genDecl, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x102463b447aL, 0x102463bb98eL, "typeVariableDeclaration"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return eq_ol94f8_a0a0a0a0a0a0a71(SPropertyOperations.getString(it, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")), name); } }).first(); } private SNode createTypeVariableReference(SNode genDecl, String name) { return _quotation_createNode_ol94f8_a0a71(findTypeVariableDeclaration(genDecl, name)); } private void updateAnnotations(SNode cls) { for (ASMAnnotation annotation : myParsedClass.getAnnotations()) { ListSequence.fromList(SLinkOperations.getChildren(cls, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6be947aL, 0x114a6beb0bdL, "annotation"))).addElement(createAnnotation(annotation)); } } private void updateExtendsForInterface(SNode intfc) { for (ASMType type : myParsedClass.getGenericInterfaces()) { ListSequence.fromList(SLinkOperations.getChildren(intfc, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101edd46144L, 0x101eddadad7L, "extendedInterface"))).addElement(SNodeOperations.cast(getTypeByASMType(type, null, intfc), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType"))); } } private void updateExtendsAndImplements(SNode cls) { ASMType refSuperclass = myParsedClass.getGenericSuperclass(); if (refSuperclass != null) { SLinkOperations.setTarget(cls, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, 0x10f6353296dL, "superclass"), SNodeOperations.cast(getTypeByASMType(refSuperclass, null, cls), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType"))); } for (ASMType type : myParsedClass.getGenericInterfaces()) { ListSequence.fromList(SLinkOperations.getChildren(cls, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, 0xff2ac0b419L, "implementedInterface"))).addElement(SNodeOperations.cast(getTypeByASMType(type, null, cls), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType"))); } } private void updateInstanceFields(SNode cls) { for (ASMField field : myParsedClass.getDeclaredFields()) { if (shallSkip(field)) { continue; } if (field.isStatic()) { continue; } if (field.isCompilerGenerated()) { continue; } SNode decl = _quotation_createNode_ol94f8_a0d0a0v(null, ASMNodeId.createId(myParsedClass, field), createVisibility(field), getTypeByASMType(field.getGenericType(), null, cls), field.getName()); for (ASMAnnotation annotation : field.getAnnotations()) { ListSequence.fromList(SLinkOperations.getChildren(decl, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6be947aL, 0x114a6beb0bdL, "annotation"))).addElement(createAnnotation(annotation)); } if (field.isDeprecated()) { BHReflection.invoke(SNodeOperations.asSConcept(SNodeOperations.getConcept(decl)), SMethodTrimmedId.create("markLoadedNodeAsDeprecated", MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca68L, "jetbrains.mps.baseLanguage.structure.FieldDeclaration"), "5H8W9_ECA0g"), decl); } ListSequence.fromList(SLinkOperations.getChildren(cls, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101d9d3ca30L, 0x4a9a46de59132803L, "member"))).addElement(decl); } } private void updateStaticFields(SNode cls) { for (ASMField field : myParsedClass.getDeclaredFields()) { if (shallSkip(field)) { continue; } if (!(field.isStatic())) { continue; } if (field.isCompilerGenerated()) { continue; } if (field.isEnumConstant()) { SNode enumClass = SNodeOperations.cast(cls, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfc367070a5L, "jetbrains.mps.baseLanguage.structure.EnumClass")); SNode ecd = _quotation_createNode_ol94f8_a0b0d0a0w(null, ASMNodeId.createId(myParsedClass, field), field.getName()); ListSequence.fromList(SLinkOperations.getChildren(enumClass, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfc367070a5L, 0xfc367503acL, "enumConstant"))).addElement(ecd); } else { SNode decl = _quotation_createNode_ol94f8_a0a0a3a0a22(null, ASMNodeId.createId(myParsedClass, field), createVisibility(field), getTypeByASMType(field.getGenericType(), null, cls), field.getName()); for (ASMAnnotation annotation : field.getAnnotations()) { ListSequence.fromList(SLinkOperations.getChildren(decl, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6be947aL, 0x114a6beb0bdL, "annotation"))).addElement(createAnnotation(annotation)); } if (field.isDeprecated()) { BHReflection.invoke(SNodeOperations.asSConcept(SNodeOperations.getConcept(decl)), SMethodTrimmedId.create("markLoadedNodeAsDeprecated", MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93c84351fL, "jetbrains.mps.baseLanguage.structure.StaticFieldDeclaration"), "5H8W9_ECCQE"), decl); } if (field.isFinal()) { SPropertyOperations.set(decl, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37a7f6eL, 0x111f9e9f00cL, "isFinal"), "" + (true)); if (field.hasValue()) { Object value = field.getValue(); if (value instanceof Integer) { SLinkOperations.setTarget(decl, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37a7f6eL, 0xf8c37f506eL, "initializer"), _quotation_createNode_ol94f8_a0a0b0b0e0a3a0a22(value.toString())); } else if (value instanceof String) { SLinkOperations.setTarget(decl, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37a7f6eL, 0xf8c37f506eL, "initializer"), _quotation_createNode_ol94f8_a0a0a1a1a4a0d0a0w((String) value)); } } } ListSequence.fromList(SLinkOperations.getChildren(cls, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101d9d3ca30L, 0x4a9a46de59132803L, "member"))).addElement(decl); } } } private void updateAnnotationMethods(final SNode annotation) { for (ASMMethod m : myParsedClass.getDeclaredMethods()) { SNode md = _quotation_createNode_ol94f8_a0a0a0x(null, ASMNodeId.createAnnotationMethodId(myParsedClass.getFqName(), m.getName()), getTypeByASMType(m.getGenericReturnType(), null, annotation), m.getName()); SLinkOperations.setTarget(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility"), _quotation_createNode_ol94f8_a0b0a0x()); if (m.getAnnotationDefault() != null) { SLinkOperations.setTarget(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6a17a27L, 0x505a7bf53e13af48L, "defaultValue"), getAnnotationValue(m.getAnnotationDefault())); } ListSequence.fromList(SLinkOperations.getChildren(annotation, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101d9d3ca30L, 0x101f2cc410bL, "method"))).addElement(md); } } private void updateConstructors(final SNode cls) { for (ASMMethod c : myParsedClass.getDeclaredConstructors()) { if (c.isSynthetic()) { continue; } if (shallSkip(c)) { continue; } SNode constructor = _quotation_createNode_ol94f8_a0d0a0y(null, ASMNodeId.createId(myParsedClass, c), createVisibility(c), SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x4975dc2bdcfa0c49L, "jetbrains.mps.baseLanguage.structure.StubStatementList")), SPropertyOperations.getString(cls, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"))); for (ASMAnnotation annotation : c.getAnnotations()) { ListSequence.fromList(SLinkOperations.getChildren(constructor, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6be947aL, 0x114a6beb0bdL, "annotation"))).addElement(createAnnotation(annotation)); } if (c.isDeprecated()) { BHReflection.invoke(SNodeOperations.asSConcept(SNodeOperations.getConcept(constructor)), SMethodTrimmedId.create("markLoadedNodeAsDeprecated", MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, "jetbrains.mps.baseLanguage.structure.BaseMethodDeclaration"), "5H8W9_EDFVg"), constructor); } for (ASMTypeVariable tv : c.getTypeParameters()) { ListSequence.fromList(SLinkOperations.getChildren(constructor, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x102463b447aL, 0x102463bb98eL, "typeVariableDeclaration"))).addElement(_quotation_createNode_ol94f8_a0a0a8a0a42(tv.getName())); } { ASMType pt; String pn; List<ASMAnnotation> pa; Iterator<ASMType> pt_iterator = ListSequence.fromList(c.getGenericParameterTypes()).iterator(); Iterator<String> pn_iterator = ListSequence.fromList(c.getParameterNames()).iterator(); Iterator<List<ASMAnnotation>> pa_iterator = ListSequence.fromList(c.getParameterAnnotations()).iterator(); while (true) { if (!(pt_iterator.hasNext())) { break; } if (!(pn_iterator.hasNext())) { break; } if (!(pa_iterator.hasNext())) { break; } pt = pt_iterator.next(); pn = pn_iterator.next(); pa = pa_iterator.next(); { if (!(SPropertyOperations.getBoolean(cls, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, 0x451f9e9f920b7f7dL, "isStatic"))) && c.getGenericParameterTypes().get(0) == pt) { continue; } SNode pd = _quotation_createNode_ol94f8_a0c0g0g0k0a0y(getTypeByASMType(pt, constructor, cls), pn); addAnnotationsToParameter(pd, pa); ListSequence.fromList(SLinkOperations.getChildren(constructor, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1feL, "parameter"))).addElement(pd); } } } for (ASMType exception : c.getExceptionTypes()) { ListSequence.fromList(SLinkOperations.getChildren(constructor, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0x10f383d6949L, "throwsItem"))).addElement(getTypeByASMType(exception, constructor, cls)); } ListSequence.fromList(SLinkOperations.getChildren(cls, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101d9d3ca30L, 0x4a9a46de59132803L, "member"))).addElement(constructor); } } private void updateInstanceMethods(SNode cls) { for (ASMMethod m : myParsedClass.getDeclaredMethods()) { if (shallSkip(m)) { continue; } if (m.isStatic()) { continue; } if (m.isBridge()) { continue; } if (m.isCompilerGenerated()) { continue; } SNode md = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b21dL, "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration")); ((jetbrains.mps.smodel.SNode) md).setId(ASMNodeId.createId(myParsedClass, m)); SPropertyOperations.set(md, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b21dL, 0x1126a8d157dL, "isAbstract"), "" + (m.isAbstract())); SLinkOperations.setTarget(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility"), createVisibility(m)); this.updateBaseMethod(m, md, cls); ListSequence.fromList(SLinkOperations.getChildren(cls, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101d9d3ca30L, 0x4a9a46de59132803L, "member"))).addElement(md); } } private void updateStaticMethods(SNode cls) { for (ASMMethod m : myParsedClass.getDeclaredMethods()) { if (shallSkip(m)) { continue; } if (!(m.isStatic())) { continue; } if (m.isCompilerGenerated()) { continue; } if (SNodeOperations.isInstanceOf(cls, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfc367070a5L, "jetbrains.mps.baseLanguage.structure.EnumClass")) && isGeneratedEnumMethod(m)) { continue; } SNode md = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfbbebabf0aL, "jetbrains.mps.baseLanguage.structure.StaticMethodDeclaration")); ((jetbrains.mps.smodel.SNode) md).setId(ASMNodeId.createId(myParsedClass, m)); SLinkOperations.setTarget(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility"), createVisibility(m)); updateBaseMethod(m, md, cls); ListSequence.fromList(SLinkOperations.getChildren(cls, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101d9d3ca30L, 0x4a9a46de59132803L, "member"))).addElement(md); } } private void updateBaseMethod(ASMMethod m, SNode md, SNode cls) { SPropertyOperations.set(md, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), m.getName()); SLinkOperations.setTarget(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body"), _quotation_createNode_ol94f8_a0b0bb()); SPropertyOperations.set(md, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0x113294bffd2L, "isFinal"), "" + (m.isFinal())); for (ASMAnnotation annotation : m.getAnnotations()) { ListSequence.fromList(SLinkOperations.getChildren(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6be947aL, 0x114a6beb0bdL, "annotation"))).addElement(createAnnotation(annotation)); } if (m.isDeprecated()) { BHReflection.invoke(SNodeOperations.asSConcept(SNodeOperations.getConcept(md)), SMethodTrimmedId.create("markLoadedNodeAsDeprecated", MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, "jetbrains.mps.baseLanguage.structure.BaseMethodDeclaration"), "5H8W9_EDFVg"), md); } SPropertyOperations.set(md, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0x3b576cda23612c7aL, "isSynchronized"), "" + (m.isSynchronized())); updateTypeVariables(m, md, cls); SLinkOperations.setTarget(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1fdL, "returnType"), getTypeByASMType(m.getGenericReturnType(), md, cls)); { ASMType pt; String pn; List<ASMAnnotation> pa; Iterator<ASMType> pt_iterator = ListSequence.fromList(m.getGenericParameterTypes()).iterator(); Iterator<String> pn_iterator = ListSequence.fromList(m.getParameterNames()).iterator(); Iterator<List<ASMAnnotation>> pa_iterator = ListSequence.fromList(m.getParameterAnnotations()).iterator(); while (true) { if (!(pt_iterator.hasNext())) { break; } if (!(pn_iterator.hasNext())) { break; } if (!(pa_iterator.hasNext())) { break; } pt = pt_iterator.next(); pn = pn_iterator.next(); pa = pa_iterator.next(); { SNode pd = _quotation_createNode_ol94f8_a0a0g0g0k0bb(getTypeByASMType(pt, md, cls), pn); addAnnotationsToParameter(pd, pa); ListSequence.fromList(SLinkOperations.getChildren(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1feL, "parameter"))).addElement(pd); } } } for (ASMType exception : m.getExceptionTypes()) { ListSequence.fromList(SLinkOperations.getChildren(md, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0x10f383d6949L, "throwsItem"))).addElement(getTypeByASMType(exception, md, cls)); } } private boolean isGeneratedEnumMethod(ASMMethod m) { if (m.getName().equals("values") && m.getParameterTypes().isEmpty()) { return true; } if (m.getName().equals("valueOf") && m.getParameterTypes().size() == 1 && m.getParameterTypes().get(0) instanceof ASMClassType) { ASMClassType type = (ASMClassType) m.getParameterTypes().get(0); return type.getName().equals("java.lang.String"); } return false; } protected SNode createVisibility(ASMMethod m) { if (m.isPublic()) { return _quotation_createNode_ol94f8_a0a0a92(); } if (m.isPrivate()) { return _quotation_createNode_ol94f8_a0a1a92(); } if (m.isProtected()) { return _quotation_createNode_ol94f8_a0a2a92(); } return null; } protected SNode createVisibility(ASMField f) { if (f.isPublic()) { return _quotation_createNode_ol94f8_a0a0a03(); } if (f.isPrivate()) { return _quotation_createNode_ol94f8_a0a1a03(); } if (f.isProtected()) { return _quotation_createNode_ol94f8_a0a2a03(); } return null; } private void addAnnotationsToParameter(SNode pd, List<ASMAnnotation> anns) { ListSequence.fromList(SLinkOperations.getChildren(pd, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6be947aL, 0x114a6beb0bdL, "annotation"))).addSequence(ListSequence.fromList(anns).select(new ISelector<ASMAnnotation, SNode>() { public SNode select(ASMAnnotation it) { return createAnnotation(it); } })); } private SNode createAnnotation(ASMAnnotation annotation) { SNode result = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6b4ccabL, "jetbrains.mps.baseLanguage.structure.AnnotationInstance")); ASMClassType c = (ASMClassType) annotation.getType(); addClassifierReference(result, MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6b4ccabL, 0x114a6b85d40L, "annotation"), c); Map<String, Object> values = ((Map<String, Object>) annotation.getValues()); for (String key : MapSequence.fromMap(values).keySet()) { SNode value = _quotation_createNode_ol94f8_a0a0e0gb(getAnnotationValue(MapSequence.fromMap(values).get(key))); addAnnotationMethodReference(value, MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a71b1af4L, 0x114a71b44e3L, "key"), c, key); ListSequence.fromList(SLinkOperations.getChildren(result, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a6b4ccabL, 0x114a71c697fL, "value"))).addElement(value); } return result; } private SNode getAnnotationValue(Object value) { if (value instanceof Integer) { return _quotation_createNode_ol94f8_a0a0a33(value.toString()); } if (value instanceof Byte) { return _quotation_createNode_ol94f8_a0a1a33(value.toString()); } if (value instanceof Short) { return _quotation_createNode_ol94f8_a0a2a33(value.toString()); } if (value instanceof Boolean) { return _quotation_createNode_ol94f8_a0a3a33(value.toString()); } if (value instanceof Character) { return _quotation_createNode_ol94f8_a0a4a33(value.toString()); } if (value instanceof Long) { return _quotation_createNode_ol94f8_a0a5a33(value.toString() + "L"); } if (value instanceof Float) { return _quotation_createNode_ol94f8_a0a6a33(value.toString()); } if (value instanceof Double) { return _quotation_createNode_ol94f8_a0a7a33(value.toString()); } if (value instanceof String) { return _quotation_createNode_ol94f8_a0a8a33(value.toString()); } if (value instanceof ASMAnnotation) { return _quotation_createNode_ol94f8_a0a9a33(createAnnotation((ASMAnnotation) value)); } if (value instanceof ASMPrimitiveType) { return _quotation_createNode_ol94f8_a0a01a33(SNodeOperations.cast(getTypeByASMType((ASMPrimitiveType) value, null, null), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10f0ad8bde4L, "jetbrains.mps.baseLanguage.structure.PrimitiveType"))); } if (value instanceof int[]) { int[] array = new int[((int[]) value).length]; return _quotation_createNode_ol94f8_a1a11a33(Sequence.fromIterable(ArrayUtils.fromIntegerArray(array)).select(new ISelector<Integer, SNode>() { public SNode select(Integer it) { return getAnnotationValue(it); } }).toGenericArray(SNode.class)); } if (value instanceof List) { List<Object> list = (List<Object>) value; return _quotation_createNode_ol94f8_a1a21a33(ListSequence.fromList(list).select(new ISelector<Object, SNode>() { public SNode select(Object it) { return getAnnotationValue(it); } }).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (it != null); } }).toListSequence()); } if (value instanceof ASMEnumValue) { ASMEnumValue enumValue = (ASMEnumValue) value; ASMClassType c = (ASMClassType) enumValue.getType(); SNode res = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfc37588bc8L, "jetbrains.mps.baseLanguage.structure.EnumConstantReference")); addClassifierReference(res, MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfc37588bc8L, 0x10a758428feL, "enumClass"), c); addEnumConstReference(res, MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfc37588bc8L, 0xfc37588bcaL, "enumConstantDeclaration"), enumValue); return res; } if (value instanceof ASMClassType) { SNode res = _quotation_createNode_ol94f8_a0a0o0hb(); addClassifierReference(res, MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x103fb730c14L, 0x103fb73a43eL, "classifier"), (ASMClassType) value); return res; } if (LOG.isEnabledFor(Level.ERROR)) { LOG.error("couldn't create annotation value from " + ((value == null ? "" : value.getClass().getName())) + " : " + value); } return null; } private SNode getTypeByASMType(ASMType type, SNode method, SNode classifier) { if (type == ASMPrimitiveType.BOOLEAN) { return createBooleanType_ol94f8_a0a0a43(); } if (type == ASMPrimitiveType.BYTE) { return createByteType_ol94f8_a0a1a43(); } if (type == ASMPrimitiveType.SHORT) { return createShortType_ol94f8_a0a2a43(); } if (type == ASMPrimitiveType.INT) { return createIntegerType_ol94f8_a0a3a43(); } if (type == ASMPrimitiveType.LONG) { return createLongType_ol94f8_a0a4a43(); } if (type == ASMPrimitiveType.FLOAT) { return createFloatType_ol94f8_a0a5a43(); } if (type == ASMPrimitiveType.DOUBLE) { return createDoubleType_ol94f8_a0a6a43(); } if (type == ASMPrimitiveType.VOID) { return createVoidType_ol94f8_a0a7a43(); } if (type == ASMPrimitiveType.CHAR) { return createCharType_ol94f8_a0a8a43(); } if (type instanceof ASMArrayType) { return _quotation_createNode_ol94f8_a0a9a43(getTypeByASMType(((ASMArrayType) type).getElementType(), method, classifier)); } if (type instanceof ASMVarArgType) { return _quotation_createNode_ol94f8_a0a01a43(getTypeByASMType(((ASMVarArgType) type).getElementType(), method, classifier)); } if (type instanceof ASMTypeVariable) { ASMTypeVariable tv = (ASMTypeVariable) type; if (method != null && findTypeVariableDeclaration(method, tv.getName()) != null) { return createTypeVariableReference(method, tv.getName()); } else if (findTypeVariableDeclaration(classifier, tv.getName()) != null) { return createTypeVariableReference(classifier, tv.getName()); } else { return getTypeByASMType(ASMClassType.OBJECT, method, classifier); } } if (type instanceof ASMClassType) { ASMClassType c = (ASMClassType) type; SNode classifierType = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType")); addClassifierReference(classifierType, MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier"), c); return classifierType; } if (type instanceof ASMParameterizedType) { ASMParameterizedType pt = (ASMParameterizedType) type; SNode rawType = SNodeOperations.cast(getTypeByASMType(pt.getRawType(), method, classifier), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType")); addTypeParameters(pt.getActualTypeArguments(), method, classifier, rawType); return rawType; } if (type instanceof ASMExtendsType) { ASMExtendsType e = (ASMExtendsType) type; if (e.getBound() instanceof ASMClassType) { ASMClassType ct = (ASMClassType) e.getBound(); if (ct.getName().equals("java.lang.Object")) { return SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x110dae5f4a3L, "jetbrains.mps.baseLanguage.structure.WildCardType")); } } return _quotation_createNode_ol94f8_a2a41a43(getTypeByASMType(e.getBound(), method, classifier)); } if (type instanceof ASMSuperType) { ASMSuperType e = (ASMSuperType) type; return _quotation_createNode_ol94f8_a1a51a43(getTypeByASMType(e.getBound(), method, classifier)); } if (type instanceof ASMUnboundedType) { return SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x110dae5f4a3L, "jetbrains.mps.baseLanguage.structure.WildCardType")); } if (LOG.isEnabledFor(Level.ERROR)) { LOG.error("Can't convert type " + type + " class : "); } return SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506dL, "jetbrains.mps.baseLanguage.structure.Type")); } private void addTypeParameters(List<? extends ASMType> typeParameters, SNode method, SNode classifier, SNode result) { List<SNode> toAdd = new ArrayList<SNode>(); for (ASMType tv : typeParameters) { SNode type = getTypeByASMType(tv, method, classifier); if (type == null) { toAdd.clear(); break; } toAdd.add(type); } ListSequence.fromList(SLinkOperations.getChildren(result, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x102419671abL, "parameter"))).addSequence(ListSequence.fromList(toAdd)); } private void addClassifierReference(SNode sourceNode, SReferenceLink role, ASMClassType clsType) { if (sourceNode.getReference(role) != null) { return; } String pack = NodeNameUtil.getNamespace(clsType.getName()); String resolve = NameUtil.shortNameFromLongName(clsType.getName()); resolve = resolve.replace('$', '.'); SNodeId nodeId = ASMNodeId.createId(clsType.getName()); SReference ref = myHandler.create(sourceNode, pack, nodeId, role, resolve, getTopClassifierNodeId(clsType)); sourceNode.setReference(role, ref); } private void addAnnotationMethodReference(SNode sourceNode, SReferenceLink role, ASMClassType annotationType, String method) { if (sourceNode.getReference(role) != null) { return; } String pack = NodeNameUtil.getNamespace(annotationType.getName()); SNodeId nodeId = ASMNodeId.createAnnotationMethodId(annotationType.getName(), method); String resolve = method; SReference ref = myHandler.create(sourceNode, pack, nodeId, role, resolve, getTopClassifierNodeId(annotationType)); sourceNode.setReference(role, ref); } private void addEnumConstReference(SNode sourceNode, SReferenceLink role, ASMEnumValue enumValue) { if (sourceNode.getReference(role) != null) { return; } ASMClassType classType = (ASMClassType) enumValue.getType(); String pack = NodeNameUtil.getNamespace(classType.getName()); String resolve = NameUtil.shortNameFromLongName(classType.getName()); resolve = resolve.replace('$', '.'); SNodeId nodeId = ASMNodeId.createFieldId(classType.getName(), enumValue.getConstant()); SReference ref = myHandler.create(sourceNode, pack, nodeId, role, resolve, getTopClassifierNodeId(classType)); sourceNode.setReference(role, ref); } private boolean shallSkip(ASMField f) { return mySkipPrivate && !((f.isPublic() || f.isProtected())); } private boolean shallSkip(ASMMethod m) { return mySkipPrivate && !((m.isPublic() || m.isProtected())); } /** * For a given type, we find top-most container classifier, and use its id as hint * to pick best possible package among visible through imports */ private SNodeId getTopClassifierNodeId(ASMClassType t) { String className = NameUtil.shortNameFromLongName(t.getName()); int i = className.indexOf('$'); return ASMNodeId.createId((i == -1 ? className : className.substring(0, i))); } private static SNode createPublicVisibility_ol94f8_a0a1a0a21() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10af9581ff1L, "jetbrains.mps.baseLanguage.structure.PublicVisibility"), null, null, false); return n1; } private static SNode _quotation_createNode_ol94f8_a0a0a0o(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x1024639ed74L, "TypeVariableDeclaration"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a0b0p(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x1024639ed74L, "TypeVariableDeclaration"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a71(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x102467229d8L, "TypeVariableReference"), null, null, false); SNodeAccessUtil.setReferenceTarget(quotedNode_2, MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x102467229d8L, 0x1024673a581L, "typeVariableDeclaration"), (SNode) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0d0a0v(Object parameter_1, Object parameter_2, Object parameter_3, Object parameter_4, Object parameter_5) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_6 = null; SNode quotedNode_7 = null; SNode quotedNode_8 = null; quotedNode_6 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8c108ca68L, "FieldDeclaration"), (SModel) parameter_1, (SNodeId) parameter_2, false); SNodeAccessUtil.setProperty(quotedNode_6, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_5); quotedNode_7 = (SNode) parameter_3; if (quotedNode_7 != null) { quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility"), HUtil.copyIfNecessary(quotedNode_7)); } quotedNode_8 = (SNode) parameter_4; if (quotedNode_8 != null) { quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x450368d90ce15bc3L, 0x4ed4d318133c80ceL, "type"), HUtil.copyIfNecessary(quotedNode_8)); } return quotedNode_6; } private static SNode _quotation_createNode_ol94f8_a0a0a3a0a22(Object parameter_1, Object parameter_2, Object parameter_3, Object parameter_4, Object parameter_5) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_6 = null; SNode quotedNode_7 = null; SNode quotedNode_8 = null; quotedNode_6 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf93c84351fL, "StaticFieldDeclaration"), (SModel) parameter_1, (SNodeId) parameter_2, false); SNodeAccessUtil.setProperty(quotedNode_6, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_5); quotedNode_7 = (SNode) parameter_3; if (quotedNode_7 != null) { quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility"), HUtil.copyIfNecessary(quotedNode_7)); } quotedNode_8 = (SNode) parameter_4; if (quotedNode_8 != null) { quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x450368d90ce15bc3L, 0x4ed4d318133c80ceL, "type"), HUtil.copyIfNecessary(quotedNode_8)); } return quotedNode_6; } private static SNode _quotation_createNode_ol94f8_a0a0b0b0e0a3a0a22(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc59b314L, "IntegerConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a0a1a1a4a0d0a0w(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf93d565d10L, "StringLiteral"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0b0d0a0w(Object parameter_1, Object parameter_2, Object parameter_3) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_4 = null; quotedNode_4 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xfc367388b3L, "EnumConstantDeclaration"), (SModel) parameter_1, (SNodeId) parameter_2, false); SNodeAccessUtil.setProperty(quotedNode_4, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_3); return quotedNode_4; } private static SNode _quotation_createNode_ol94f8_a0a0a0x(Object parameter_1, Object parameter_2, Object parameter_3, Object parameter_4) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_5 = null; SNode quotedNode_6 = null; SNode quotedNode_7 = null; SNode quotedNode_8 = null; quotedNode_5 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x114a6a17a27L, "AnnotationMethodDeclaration"), (SModel) parameter_1, (SNodeId) parameter_2, false); SNodeAccessUtil.setProperty(quotedNode_5, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_4); quotedNode_6 = (SNode) parameter_3; if (quotedNode_6 != null) { quotedNode_5.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1fdL, "returnType"), HUtil.copyIfNecessary(quotedNode_6)); } quotedNode_7 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x10af9581ff1L, "PublicVisibility"), (SModel) parameter_1, (SNodeId) parameter_2, false); quotedNode_5.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility"), quotedNode_7); quotedNode_8 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc56b200L, "StatementList"), (SModel) parameter_1, (SNodeId) parameter_2, false); quotedNode_5.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body"), quotedNode_8); return quotedNode_5; } private static SNode _quotation_createNode_ol94f8_a0b0a0x() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x10af9581ff1L, "PublicVisibility"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_ol94f8_a0d0a0y(Object parameter_1, Object parameter_2, Object parameter_3, Object parameter_4, Object parameter_5) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_6 = null; SNode quotedNode_7 = null; SNode quotedNode_8 = null; SNode quotedNode_9 = null; quotedNode_6 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc56b204L, "ConstructorDeclaration"), (SModel) parameter_1, (SNodeId) parameter_2, false); SNodeAccessUtil.setProperty(quotedNode_6, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_5); quotedNode_7 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc6bf96dL, "VoidType"), (SModel) parameter_1, (SNodeId) parameter_2, false); quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1fdL, "returnType"), quotedNode_7); quotedNode_8 = (SNode) parameter_3; if (quotedNode_8 != null) { quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x112670d273fL, 0x112670d886aL, "visibility"), HUtil.copyIfNecessary(quotedNode_8)); } quotedNode_9 = (SNode) parameter_4; if (quotedNode_9 != null) { quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body"), HUtil.copyIfNecessary(quotedNode_9)); } return quotedNode_6; } private static SNode _quotation_createNode_ol94f8_a0a0a8a0a42(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x1024639ed74L, "TypeVariableDeclaration"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0c0g0g0k0a0y(Object parameter_1, Object parameter_2) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_3 = null; SNode quotedNode_4 = null; quotedNode_3 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8c77f1e94L, "ParameterDeclaration"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_3, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_2); quotedNode_4 = (SNode) parameter_1; if (quotedNode_4 != null) { quotedNode_3.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x450368d90ce15bc3L, 0x4ed4d318133c80ceL, "type"), HUtil.copyIfNecessary(quotedNode_4)); } return quotedNode_3; } private static SNode _quotation_createNode_ol94f8_a0b0bb() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x4975dc2bdcfa0c49L, "StubStatementList"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_ol94f8_a0a0g0g0k0bb(Object parameter_1, Object parameter_2) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_3 = null; SNode quotedNode_4 = null; quotedNode_3 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8c77f1e94L, "ParameterDeclaration"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_3, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), (String) parameter_2); quotedNode_4 = (SNode) parameter_1; if (quotedNode_4 != null) { quotedNode_3.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x450368d90ce15bc3L, 0x4ed4d318133c80ceL, "type"), HUtil.copyIfNecessary(quotedNode_4)); } return quotedNode_3; } private static SNode _quotation_createNode_ol94f8_a0a0a92() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x10af9581ff1L, "PublicVisibility"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_ol94f8_a0a1a92() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x10af9586f0cL, "PrivateVisibility"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_ol94f8_a0a2a92() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x10af958b686L, "ProtectedVisibility"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_ol94f8_a0a0a03() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x10af9581ff1L, "PublicVisibility"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_ol94f8_a0a1a03() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x10af9586f0cL, "PrivateVisibility"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_ol94f8_a0a2a03() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x10af958b686L, "ProtectedVisibility"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_ol94f8_a0a0e0gb(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x114a71b1af4L, "AnnotationInstanceValue"), null, null, false); quotedNode_3 = (SNode) parameter_1; if (quotedNode_3 != null) { quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a71b1af4L, 0x114a71c0fc4L, "value"), HUtil.copyIfNecessary(quotedNode_3)); } return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a0a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc59b314L, "IntegerConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a1a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc59b314L, "IntegerConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a2a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc59b314L, "IntegerConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a3a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc56b201L, "BooleanConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b201L, 0xf8cc56b202L, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a4a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x1177d44b21bL, "CharConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x1177d44b21bL, 0x1177d44ddefL, "charConstant"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a5a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x3b418722717710b4L, "LongLiteral"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x3b418722717710b4L, 0x3b418722717710b5L, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a6a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x102cb19a434L, "FloatingPointConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x102cb19a434L, 0x103245d193fL, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a7a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x102cb19a434L, "FloatingPointConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x102cb19a434L, 0x103245d193fL, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a8a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf93d565d10L, "StringLiteral"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_2, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), (String) parameter_1); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a9a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; quotedNode_2 = (SNode) parameter_1; if (quotedNode_2 != null) { } return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a01a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x3f57ea36bd70a4e1L, "PrimitiveClassExpression"), null, null, false); quotedNode_3 = (SNode) parameter_1; if (quotedNode_3 != null) { quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x3f57ea36bd70a4e1L, 0x3f57ea36bd70a4e2L, "primitiveType"), HUtil.copyIfNecessary(quotedNode_3)); } return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a1a11a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; SNode quotedNode_4 = null; SNode quotedNode_5 = null; SNode quotedNode_6 = null; SNode quotedNode_7 = null; SNode quotedNode_8 = null; SNode quotedNode_9 = null; SNode quotedNode_10 = null; SNode quotedNode_11 = null; SNode quotedNode_12 = null; SNode quotedNode_13 = null; SNode quotedNode_14 = null; SNode quotedNode_15 = null; SNode quotedNode_16 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x3a13115c633c4c5cL, 0xbbcc75c4219e9555L, "jetbrains.mps.lang.quotation"), 0x1168c104658L, "Antiquotation"), null, null, false); quotedNode_3 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x116b46a08c4L, "DotExpression"), null, null, false); quotedNode_4 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x116b46a08c4L, "DotExpression"), null, null, false); quotedNode_6 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x116b46a08c4L, "DotExpression"), null, null, false); quotedNode_8 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8c77f1e98L, "VariableReference"), null, null, false); quotedNode_8.setReference(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e98L, 0xf8cc6bf960L, "variableDeclaration"), jetbrains.mps.smodel.SReference.create(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e98L, 0xf8cc6bf960L, "variableDeclaration"), quotedNode_8, facade.createModelReference("r:aa7e8178-3b66-4295-bcce-165c85d78006(jetbrains.mps.baseLanguage.javastub)"), facade.createNodeId("7045185297761942120"))); quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand"), quotedNode_8); quotedNode_9 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, "jetbrains.mps.baseLanguage.collections"), 0x120c92e6703L, "AsSequenceOperation"), null, null, false); quotedNode_6.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation"), quotedNode_9); quotedNode_4.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand"), quotedNode_6); quotedNode_7 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, "jetbrains.mps.baseLanguage.collections"), 0x117e4785fdeL, "SelectOperation"), null, null, false); quotedNode_10 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xfd3920347849419dL, 0x907112563d152375L, "jetbrains.mps.baseLanguage.closures"), 0x1174bed3125L, "ClosureLiteral"), null, null, false); quotedNode_11 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc56b200L, "StatementList"), null, null, false); quotedNode_13 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc56b213L, "ExpressionStatement"), null, null, false); quotedNode_15 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x6c6b6a1e379f9404L, "LocalMethodCall"), null, null, false); quotedNode_15.setReference(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11857355952L, 0xf8c78301adL, "baseMethodDeclaration"), jetbrains.mps.smodel.SReference.create(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11857355952L, 0xf8c78301adL, "baseMethodDeclaration"), quotedNode_15, facade.createModelReference("r:aa7e8178-3b66-4295-bcce-165c85d78006(jetbrains.mps.baseLanguage.javastub)"), facade.createNodeId("2566197375814063500"))); quotedNode_16 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8c77f1e98L, "VariableReference"), null, null, false); quotedNode_15.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11857355952L, 0xf8c78301aeL, "actualArgument"), quotedNode_16); quotedNode_13.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, 0xf8cc56b214L, "expression"), quotedNode_15); quotedNode_11.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"), quotedNode_13); quotedNode_10.addChild(MetaAdapterFactory.getContainmentLink(0xfd3920347849419dL, 0x907112563d152375L, 0x1174bed3125L, 0x1174bf0522fL, "body"), quotedNode_11); quotedNode_12 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, "jetbrains.mps.baseLanguage.collections"), 0x118374464e4L, "SmartClosureParameterDeclaration"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_12, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "it"); quotedNode_14 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x431d52a5d09a4ea9L, "UndefinedType"), null, null, false); quotedNode_12.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x450368d90ce15bc3L, 0x4ed4d318133c80ceL, "type"), quotedNode_14); quotedNode_10.addChild(MetaAdapterFactory.getContainmentLink(0xfd3920347849419dL, 0x907112563d152375L, 0x1174bed3125L, 0x1174bf02c34L, "parameter"), quotedNode_12); quotedNode_7.addChild(MetaAdapterFactory.getContainmentLink(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x1188372895aL, 0x11883748452L, "closure"), quotedNode_10); quotedNode_4.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation"), quotedNode_7); quotedNode_3.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand"), quotedNode_4); quotedNode_5 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, "jetbrains.mps.baseLanguage.collections"), 0x113e55393bdL, "ToArrayOperation"), null, null, false); quotedNode_3.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation"), quotedNode_5); quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0x3a13115c633c4c5cL, 0xbbcc75c4219e9555L, 0x1168c104656L, 0x1168c104657L, "expression"), quotedNode_3); quotedNode_16.setReferenceTarget(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e98L, 0xf8cc6bf960L, "variableDeclaration"), quotedNode_12); return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a1a21a33(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x114a770dc0dL, "ArrayLiteral"), null, null, false); { List<SNode> nodes = (List<SNode>) parameter_1; for (SNode child : nodes) { quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x114a770dc0dL, 0x114a770fdbfL, "item"), HUtil.copyIfNecessary(child)); } } return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a0o0hb() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x103fb730c14L, "ClassifierClassExpression"), null, null, false); quotedNode_1.setReference(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x103fb730c14L, 0x103fb73a43eL, "classifier"), jetbrains.mps.smodel.SReference.create(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x103fb730c14L, 0x103fb73a43eL, "classifier"), quotedNode_1, facade.createModelReference("r:eafb5d8e-2952-4826-b4ad-be2b9011f598(jetbrains.mps.baseLanguage.javastub.asm)"), facade.createNodeId("7241381882860002170"))); return quotedNode_1; } private static SNode createBooleanType_ol94f8_a0a0a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940d6513eL, "jetbrains.mps.baseLanguage.structure.BooleanType"), null, null, false); return n1; } private static SNode createByteType_ol94f8_a0a1a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940d5b617L, "jetbrains.mps.baseLanguage.structure.ByteType"), null, null, false); return n1; } private static SNode createShortType_ol94f8_a0a2a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940cc380dL, "jetbrains.mps.baseLanguage.structure.ShortType"), null, null, false); return n1; } private static SNode createIntegerType_ol94f8_a0a3a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940d22479L, "jetbrains.mps.baseLanguage.structure.IntegerType"), null, null, false); return n1; } private static SNode createLongType_ol94f8_a0a4a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7f3L, "jetbrains.mps.baseLanguage.structure.LongType"), null, null, false); return n1; } private static SNode createFloatType_ol94f8_a0a5a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940d327fdL, "jetbrains.mps.baseLanguage.structure.FloatType"), null, null, false); return n1; } private static SNode createDoubleType_ol94f8_a0a6a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940d451a6L, "jetbrains.mps.baseLanguage.structure.DoubleType"), null, null, false); return n1; } private static SNode createVoidType_ol94f8_a0a7a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc6bf96dL, "jetbrains.mps.baseLanguage.structure.VoidType"), null, null, false); return n1; } private static SNode createCharType_ol94f8_a0a8a43() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode n1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940d4f826L, "jetbrains.mps.baseLanguage.structure.CharType"), null, null, false); return n1; } private static SNode _quotation_createNode_ol94f8_a0a9a43(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf940d819f7L, "ArrayType"), null, null, false); quotedNode_3 = (SNode) parameter_1; if (quotedNode_3 != null) { quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940d819f7L, 0xf940d819f8L, "componentType"), HUtil.copyIfNecessary(quotedNode_3)); } return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a0a01a43(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x11c08f42e7bL, "VariableArityType"), null, null, false); quotedNode_3 = (SNode) parameter_1; if (quotedNode_3 != null) { quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11c08f42e7bL, 0x11c08f5f38cL, "componentType"), HUtil.copyIfNecessary(quotedNode_3)); } return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a2a41a43(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x110daeaa84aL, "UpperBoundType"), null, null, false); quotedNode_3 = (SNode) parameter_1; if (quotedNode_3 != null) { quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x110daeaa84aL, 0x110daeaa84bL, "bound"), HUtil.copyIfNecessary(quotedNode_3)); } return quotedNode_2; } private static SNode _quotation_createNode_ol94f8_a1a51a43(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x110dae9d53dL, "LowerBoundType"), null, null, false); quotedNode_3 = (SNode) parameter_1; if (quotedNode_3 != null) { quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x110dae9d53dL, 0x110dae9f25bL, "bound"), HUtil.copyIfNecessary(quotedNode_3)); } return quotedNode_2; } private static boolean eq_ol94f8_a0a0a0a0a0a0a71(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } }