< prev index next >

test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java

Print this page
@@ -19,10 +19,12 @@
   * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
+ // -- This file was mechanically generated: Do not edit! -- //
+ 
  /*
   * @test
   * @bug 8156486
   * @run testng/othervm VarHandleTestMethodTypeDouble
   * @run testng/othervm -Djava.lang.invoke.VarHandle.VAR_HANDLE_GUARDS=true -Djava.lang.invoke.VarHandle.VAR_HANDLE_IDENTITY_ADAPT=true VarHandleTestMethodTypeDouble

@@ -43,10 +45,12 @@
  import static org.testng.Assert.*;
  
  import static java.lang.invoke.MethodType.*;
  
  public class VarHandleTestMethodTypeDouble extends VarHandleBaseTest {
+     static final Class<?> type = double.class;
+ 
      static final double static_final_v = 1.0d;
  
      static double static_v = 1.0d;
  
      final double final_v = 1.0d;

@@ -64,20 +68,20 @@
      VarHandle vhArray;
  
      @BeforeClass
      public void setup() throws Exception {
          vhFinalField = MethodHandles.lookup().findVarHandle(
-                 VarHandleTestMethodTypeDouble.class, "final_v", double.class);
+                 VarHandleTestMethodTypeDouble.class, "final_v", type);
  
          vhField = MethodHandles.lookup().findVarHandle(
-                 VarHandleTestMethodTypeDouble.class, "v", double.class);
+                 VarHandleTestMethodTypeDouble.class, "v", type);
  
          vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
-             VarHandleTestMethodTypeDouble.class, "static_final_v", double.class);
+             VarHandleTestMethodTypeDouble.class, "static_final_v", type);
  
          vhStaticField = MethodHandles.lookup().findStaticVarHandle(
-             VarHandleTestMethodTypeDouble.class, "static_v", double.class);
+             VarHandleTestMethodTypeDouble.class, "static_v", type);
  
          vhArray = MethodHandles.arrayElementVarHandle(double[].class);
      }
  
      @DataProvider

@@ -733,19 +737,19 @@
  
      static void testInstanceFieldWrongMethodType(VarHandleTestMethodTypeDouble recv, Handles hs) throws Throwable {
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class)).
                      invokeExact((VarHandleTestMethodTypeDouble) null);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class)).
                      invokeExact(Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 double x = (double) hs.get(am, methodType(double.class, int.class)).
+                 double x = (double) hs.get(am, methodType(type, int.class)).
                      invokeExact(0);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
                  Void x = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeDouble.class)).

@@ -755,192 +759,192 @@
                  boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class)).
                      invokeExact(recv);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact((VarHandleTestMethodTypeDouble) null, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 hs.get(am, methodType(void.class, Class.class, double.class)).
+                 hs.get(am, methodType(void.class, Class.class, type)).
                      invokeExact(Void.class, 1.0d);
              });
              checkWMTE(() -> { // value reference class
                  hs.get(am, methodType(void.class, VarHandleTestMethodTypeDouble.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 hs.get(am, methodType(void.class, int.class, double.class)).
+                 hs.get(am, methodType(void.class, int.class, type)).
                      invokeExact(0, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeDouble.class, double.class, Class.class)).
+                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeDouble.class, type, Class.class)).
                      invokeExact(recv, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, double.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, type, type)).
                      invokeExact((VarHandleTestMethodTypeDouble) null, 1.0d, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, double.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, type, type)).
                      invokeExact(Void.class, 1.0d, 1.0d);
              });
              checkWMTE(() -> { // expected reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, Class.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, Class.class, type)).
                      invokeExact(recv, Void.class, 1.0d);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, double.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, type, Class.class)).
                      invokeExact(recv, 1.0d, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class , double.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class , type, type)).
                      invokeExact(0, 1.0d, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  boolean r = (boolean) hs.get(am, methodType(boolean.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, double.class, double.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, type, type, Class.class)).
                      invokeExact(recv, 1.0d, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
              checkNPE(() -> { // null receiver
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, double.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, type, type)).
                      invokeExact((VarHandleTestMethodTypeDouble) null, 1.0d, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class, double.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class, type, type)).
                      invokeExact(Void.class, 1.0d, 1.0d);
              });
              checkWMTE(() -> { // expected reference class
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, Class.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, Class.class, type)).
                      invokeExact(recv, Void.class, 1.0d);
              });
              checkWMTE(() -> { // actual reference class
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, type, Class.class)).
                      invokeExact(recv, 1.0d, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 double x = (double) hs.get(am, methodType(double.class, int.class , double.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, int.class , type, type)).
                      invokeExact(0, 1.0d, 1.0d);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeDouble.class , double.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeDouble.class , type, type)).
                      invokeExact(recv, 1.0d, 1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class , double.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class , type, type)).
                      invokeExact(recv, 1.0d, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, double.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, type, type, Class.class)).
                      invokeExact(recv, 1.0d, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
              checkNPE(() -> { // null receiver
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact((VarHandleTestMethodTypeDouble) null, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, 1.0d);
              });
              checkWMTE(() -> { // value reference class
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 double x = (double) hs.get(am, methodType(double.class, int.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, int.class, type)).
                      invokeExact(0, 1.0d);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact(recv, 1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact(recv, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact(recv, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
              checkNPE(() -> { // null receiver
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact((VarHandleTestMethodTypeDouble) null, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, 1.0d);
              });
              checkWMTE(() -> { // value reference class
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 double x = (double) hs.get(am, methodType(double.class, int.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, int.class, type)).
                      invokeExact(0, 1.0d);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact(recv, 1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact(recv, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, VarHandleTestMethodTypeDouble.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, VarHandleTestMethodTypeDouble.class, type)).
                      invokeExact(recv, 1.0d, Void.class);
              });
          }
  
      }

@@ -1368,113 +1372,113 @@
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 hs.get(am, methodType(void.class, double.class, Class.class)).
+                 hs.get(am, methodType(void.class, type, Class.class)).
                      invokeExact(1.0d, Void.class);
              });
          }
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
              // Incorrect argument types
              checkWMTE(() -> { // expected reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, type)).
                      invokeExact(Void.class, 1.0d);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, type, Class.class)).
                      invokeExact(1.0d, Void.class);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  boolean r = (boolean) hs.get(am, methodType(boolean.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double.class, double.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, type, type, Class.class)).
                      invokeExact(1.0d, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
              // Incorrect argument types
              checkWMTE(() -> { // expected reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, 1.0d);
              });
              checkWMTE(() -> { // actual reference class
-                 double x = (double) hs.get(am, methodType(double.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(1.0d, Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, double.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type, type)).
                      invokeExact(1.0d, 1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, type, type)).
                      invokeExact(1.0d, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, double.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, type, type, Class.class)).
                      invokeExact(1.0d, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
              // Incorrect argument types
              checkWMTE(() -> { // value reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class)).
                      invokeExact(Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type)).
                      invokeExact(1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, type)).
                      invokeExact(1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
              // Incorrect argument types
              checkWMTE(() -> { // value reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class)).
                      invokeExact(Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type)).
                      invokeExact(1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, type)).
                      invokeExact(1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(1.0d, Void.class);
              });
          }
  
      }

@@ -2164,23 +2168,23 @@
          Arrays.fill(array, 1.0d);
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) {
              // Incorrect argument types
              checkNPE(() -> { // null array
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class)).
                      invokeExact((double[]) null, 0);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class, int.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class, int.class)).
                      invokeExact(Void.class, 0);
              });
              checkWMTE(() -> { // array primitive class
-                 double x = (double) hs.get(am, methodType(double.class, int.class, int.class)).
+                 double x = (double) hs.get(am, methodType(type, int.class, int.class)).
                      invokeExact(0, 0);
              });
              checkWMTE(() -> { // index reference class
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, Class.class)).
                      invokeExact(array, Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
                  Void x = (Void) hs.get(am, methodType(Void.class, double[].class, int.class)).

@@ -2190,39 +2194,39 @@
                  boolean x = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class)).
                      invokeExact(array, 0);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null array
-                 hs.get(am, methodType(void.class, double[].class, int.class, double.class)).
+                 hs.get(am, methodType(void.class, double[].class, int.class, type)).
                      invokeExact((double[]) null, 0, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 hs.get(am, methodType(void.class, Class.class, int.class, double.class)).
+                 hs.get(am, methodType(void.class, Class.class, int.class, type)).
                      invokeExact(Void.class, 0, 1.0d);
              });
              checkWMTE(() -> { // value reference class
                  hs.get(am, methodType(void.class, double[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 hs.get(am, methodType(void.class, int.class, int.class, double.class)).
+                 hs.get(am, methodType(void.class, int.class, int.class, type)).
                      invokeExact(0, 0, 1.0d);
              });
              checkWMTE(() -> { // index reference class
-                 hs.get(am, methodType(void.class, double[].class, Class.class, double.class)).
+                 hs.get(am, methodType(void.class, double[].class, Class.class, type)).
                      invokeExact(array, Void.class, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).

@@ -2234,170 +2238,170 @@
              });
          }
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, double.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, type, type)).
                      invokeExact((double[]) null, 0, 1.0d, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, double.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, type, type)).
                      invokeExact(Void.class, 0, 1.0d, 1.0d);
              });
              checkWMTE(() -> { // expected reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, Class.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, Class.class, type)).
                      invokeExact(array, 0, Void.class, 1.0d);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, double.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, type, Class.class)).
                      invokeExact(array, 0, 1.0d, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, double.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, type, type)).
                      invokeExact(0, 0, 1.0d, 1.0d);
              });
              checkWMTE(() -> { // index reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, Class.class, double.class, double.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, Class.class, type, type)).
                      invokeExact(array, Void.class, 1.0d, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  boolean r = (boolean) hs.get(am, methodType(boolean.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, double.class, double.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, type, type, Class.class)).
                      invokeExact(array, 0, 1.0d, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, double.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, type, type)).
                      invokeExact((double[]) null, 0, 1.0d, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class, int.class, double.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class, int.class, type, type)).
                      invokeExact(Void.class, 0, 1.0d, 1.0d);
              });
              checkWMTE(() -> { // expected reference class
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, Class.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, Class.class, type)).
                      invokeExact(array, 0, Void.class, 1.0d);
              });
              checkWMTE(() -> { // actual reference class
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, type, Class.class)).
                      invokeExact(array, 0, 1.0d, Void.class);
              });
              checkWMTE(() -> { // array primitive class
-                 double x = (double) hs.get(am, methodType(double.class, int.class, int.class, double.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, int.class, int.class, type, type)).
                      invokeExact(0, 0, 1.0d, 1.0d);
              });
              checkWMTE(() -> { // index reference class
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, Class.class, double.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, Class.class, type, type)).
                      invokeExact(array, Void.class, 1.0d, 1.0d);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, double[].class, int.class, double.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, double[].class, int.class, type, type)).
                      invokeExact(array, 0, 1.0d, 1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, double.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, type, type)).
                      invokeExact(array, 0, 1.0d, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, double.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, type, type, Class.class)).
                      invokeExact(array, 0, 1.0d, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null array
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, type)).
                      invokeExact((double[]) null, 0, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class, int.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class, int.class, type)).
                      invokeExact(Void.class, 0, 1.0d);
              });
              checkWMTE(() -> { // value reference class
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
              checkWMTE(() -> { // array primitive class
-                 double x = (double) hs.get(am, methodType(double.class, int.class, int.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, int.class, int.class, type)).
                      invokeExact(0, 0, 1.0d);
              });
              checkWMTE(() -> { // index reference class
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, Class.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, Class.class, type)).
                      invokeExact(array, Void.class, 1.0d);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, double[].class, int.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, double[].class, int.class, type)).
                      invokeExact(array, 0, 1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, type)).
                      invokeExact(array, 0, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, type, Class.class)).
                      invokeExact(array, 0, 1.0d, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
              // Incorrect argument types
              checkNPE(() -> { // null array
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, type)).
                      invokeExact((double[]) null, 0, 1.0d);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 double x = (double) hs.get(am, methodType(double.class, Class.class, int.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, Class.class, int.class, type)).
                      invokeExact(Void.class, 0, 1.0d);
              });
              checkWMTE(() -> { // value reference class
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
              checkWMTE(() -> { // array primitive class
-                 double x = (double) hs.get(am, methodType(double.class, int.class, int.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, int.class, int.class, type)).
                      invokeExact(0, 0, 1.0d);
              });
              checkWMTE(() -> { // index reference class
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, Class.class, double.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, Class.class, type)).
                      invokeExact(array, Void.class, 1.0d);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, double[].class, int.class, double.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, double[].class, int.class, type)).
                      invokeExact(array, 0, 1.0d);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, double.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, double[].class, int.class, type)).
                      invokeExact(array, 0, 1.0d);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 double x = (double) hs.get(am, methodType(double.class)).
+                 double x = (double) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 double x = (double) hs.get(am, methodType(double.class, double[].class, int.class, double.class, Class.class)).
+                 double x = (double) hs.get(am, methodType(type, double[].class, int.class, type, Class.class)).
                      invokeExact(array, 0, 1.0d, Void.class);
              });
          }
  
      }
< prev index next >