diff src/main/gov/nasa/jpf/vm/ClassLoaderInfo.java @ 28:7be90179bb3b

Provided support for double colon operator used for lamabda expressions. Fixed a bug related to generating names for funcation object classes (by supporting double colon operator, a new stragety needed to generate unique names for function objects. To achive that the bootstrap ids are incorporated into names). Finally modified the method that retrieves the SAM from functional interfaces.
author nastaran <nastaran.shafiei@gmail.com>
date Thu, 25 Jun 2015 13:20:50 -0700
parents 6774e2e08d37
children
line wrap: on
line diff
--- a/src/main/gov/nasa/jpf/vm/ClassLoaderInfo.java	Mon May 11 12:17:18 2015 -0700
+++ b/src/main/gov/nasa/jpf/vm/ClassLoaderInfo.java	Thu Jun 25 13:20:50 2015 -0700
@@ -448,8 +448,8 @@
    * This method returns a type which implements the given functional interface 
    * and contains a method that captures the behavior of the lambda expression.
    */
-  public ClassInfo getResolvedFuncObjType (ClassInfo fiClassInfo, String samUniqueName, BootstrapMethodInfo bmi, String[] freeVariableTypeNames) {
-    String typeName = bmi.enclosingClass.getName() + "$$" + bmi.lambdaBody.getName();
+  public ClassInfo getResolvedFuncObjType (int bsIdx, ClassInfo fiClassInfo, String samUniqueName, BootstrapMethodInfo bmi, String[] freeVariableTypeNames) {
+    String typeName = bmi.enclosingClass.getName() + "$$Lambda$" + bsIdx;
     
     ClassInfo funcObjType = resolvedClasses.get( typeName);