コード例 #1
0
 /*package*/ static SNode deriveType_idhEwIVPz(@NotNull SNode __thisNode__, SNode expression) {
   SNode type = null;
   if (SNodeOperations.getParent(expression) == __thisNode__
       && SNodeOperations.hasRole(
           expression,
           MetaAdapterFactory.getContainmentLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xf8cc67c7feL,
               0xf8cc6bf96cL,
               "expression"))) {
     SNode ancestor =
         SNodeOperations.getNodeAncestorWhereConceptInList(
             __thisNode__,
             new SAbstractConcept[] {
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0xf8cc56b1fcL,
                   "jetbrains.mps.baseLanguage.structure.BaseMethodDeclaration"),
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x108bbca0f48L,
                   "jetbrains.mps.baseLanguage.structure.ConceptFunction")
             },
             false,
             false);
     if (SNodeOperations.isInstanceOf(
         ancestor,
         MetaAdapterFactory.getConcept(
             0xf3061a5392264cc5L,
             0xa443f952ceaf5816L,
             0xf8cc56b1fcL,
             "jetbrains.mps.baseLanguage.structure.BaseMethodDeclaration"))) {
       type =
           SNodeOperations.copyNode(
               SLinkOperations.getTarget(
                   SNodeOperations.cast(
                       ancestor,
                       MetaAdapterFactory.getConcept(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0xf8cc56b1fcL,
                           "jetbrains.mps.baseLanguage.structure.BaseMethodDeclaration")),
                   MetaAdapterFactory.getContainmentLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0xf8cc56b1fcL,
                       0xf8cc56b1fdL,
                       "returnType")));
     } else {
       SNode expectedReturnType =
           ConceptFunction__BehaviorDescriptor.getExpectedReturnType_idhEwIGRD.invoke(
               SNodeOperations.cast(
                   ancestor,
                   MetaAdapterFactory.getConcept(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0x108bbca0f48L,
                       "jetbrains.mps.baseLanguage.structure.ConceptFunction")));
       if (SNodeOperations.isInstanceOf(
           expectedReturnType,
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xf8c37f506dL,
               "jetbrains.mps.baseLanguage.structure.Type"))) {
         type =
             SNodeOperations.cast(
                 SNodeOperations.copyNode(expectedReturnType),
                 MetaAdapterFactory.getConcept(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0xf8c37f506dL,
                     "jetbrains.mps.baseLanguage.structure.Type"));
       }
     }
   }
   return type;
 }