< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java

Print this page
@@ -886,11 +886,19 @@
                      make.at(prevPos);
                  }
              }
          }
  
-         return makeIndyCall(tree, syms.lambdaMetafactory, metafactoryName, staticArgs, indyType, indy_args, samSym.name);
+         Name lambdaName = samSym.name;
+         if (tree.codeReflectionInfo != null) {
+             lambdaName = lambdaName
+                     .append(names.fromString("="))
+                     .append(tree.codeReflectionInfo.codeModel().name);
+         }
+         Type lambdaMetafactory = tree.codeReflectionInfo != null ?
+                 tree.codeReflectionInfo.reflectableLambdaMetafactory() : syms.lambdaMetafactory;
+         return makeIndyCall(tree, lambdaMetafactory, metafactoryName, staticArgs, indyType, indy_args, lambdaName);
      }
  
      /**
       * Generate an indy method call with given name, type and static bootstrap
       * arguments types
< prev index next >