jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template
changeset 37343 35a2231828a7
parent 36934 590fc47a0aeb
child 37719 add11bc0e6e2
child 38355 674cfd9b90cf
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template	Wed Apr 13 09:35:26 2016 -0300
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template	Wed Apr 13 15:05:48 2016 +0200
@@ -121,131 +121,131 @@
     static void testInstanceField(VarHandleTestMethodHandleAccess$Type$ recv, Handles hs) throws Throwable {
         // Plain
         {
-            hs.get(TestAccessMode.set).invokeExact(recv, $value1$);
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value1$, "set $type$ value");
         }
 
 
         // Volatile
         {
-            hs.get(TestAccessMode.setVolatile).invokeExact(recv, $value2$);
-            $type$ x = ($type$) hs.get(TestAccessMode.getVolatile).invokeExact(recv);
+            hs.get(TestAccessMode.SET_VOLATILE).invokeExact(recv, $value2$);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET_VOLATILE).invokeExact(recv);
             assertEquals(x, $value2$, "setVolatile $type$ value");
         }
 
         // Lazy
         {
-            hs.get(TestAccessMode.setRelease).invokeExact(recv, $value1$);
-            $type$ x = ($type$) hs.get(TestAccessMode.getAcquire).invokeExact(recv);
+            hs.get(TestAccessMode.SET_RELEASE).invokeExact(recv, $value1$);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET_ACQUIRE).invokeExact(recv);
             assertEquals(x, $value1$, "setRelease $type$ value");
         }
 
         // Opaque
         {
-            hs.get(TestAccessMode.setOpaque).invokeExact(recv, $value2$);
-            $type$ x = ($type$) hs.get(TestAccessMode.getOpaque).invokeExact(recv);
+            hs.get(TestAccessMode.SET_OPAQUE).invokeExact(recv, $value2$);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET_OPAQUE).invokeExact(recv);
             assertEquals(x, $value2$, "setOpaque $type$ value");
         }
 
 #if[CAS]
-        hs.get(TestAccessMode.set).invokeExact(recv, $value1$);
+        hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
 
         // Compare
         {
-            boolean r = (boolean) hs.get(TestAccessMode.compareAndSet).invokeExact(recv, $value1$, $value2$);
+            boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(recv, $value1$, $value2$);
             assertEquals(r, true, "success compareAndSet $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value2$, "success compareAndSet $type$ value");
         }
 
         {
-            boolean r = (boolean) hs.get(TestAccessMode.compareAndSet).invokeExact(recv, $value1$, $value3$);
+            boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(recv, $value1$, $value3$);
             assertEquals(r, false, "failing compareAndSet $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value2$, "failing compareAndSet $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeVolatile).invokeExact(recv, $value2$, $value1$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(recv, $value2$, $value1$);
             assertEquals(r, $value2$, "success compareAndExchangeVolatile $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value1$, "success compareAndExchangeVolatile $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeVolatile).invokeExact(recv, $value2$, $value3$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(recv, $value2$, $value3$);
             assertEquals(r, $value1$, "failing compareAndExchangeVolatile $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value1$, "failing compareAndExchangeVolatile $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeAcquire).invokeExact(recv, $value1$, $value2$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(recv, $value1$, $value2$);
             assertEquals(r, $value1$, "success compareAndExchangeAcquire $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value2$, "success compareAndExchangeAcquire $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeAcquire).invokeExact(recv, $value1$, $value3$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(recv, $value1$, $value3$);
             assertEquals(r, $value2$, "failing compareAndExchangeAcquire $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value2$, "failing compareAndExchangeAcquire $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeRelease).invokeExact(recv, $value2$, $value1$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(recv, $value2$, $value1$);
             assertEquals(r, $value2$, "success compareAndExchangeRelease $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value1$, "success compareAndExchangeRelease $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeRelease).invokeExact(recv, $value2$, $value3$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(recv, $value2$, $value3$);
             assertEquals(r, $value1$, "failing compareAndExchangeRelease $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value1$, "failing compareAndExchangeRelease $type$ value");
         }
 
         {
-            boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSet).invokeExact(recv, $value1$, $value2$);
+            boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, $value1$, $value2$);
             assertEquals(r, true, "weakCompareAndSet $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
         }
 
         {
-            boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSetAcquire).invokeExact(recv, $value2$, $value1$);
+            boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, $value2$, $value1$);
             assertEquals(r, true, "weakCompareAndSetAcquire $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value1$, "weakCompareAndSetAcquire $type$");
         }
 
         {
-            boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSetRelease).invokeExact(recv, $value1$, $value2$);
+            boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, $value1$, $value2$);
             assertEquals(r, true, "weakCompareAndSetRelease $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value2$, "weakCompareAndSetRelease $type$");
         }
 
         // Compare set and get
         {
-            $type$ o = ($type$) hs.get(TestAccessMode.getAndSet).invokeExact(recv, $value1$);
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET).invokeExact(recv, $value1$);
             assertEquals(o, $value2$, "getAndSet $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(recv);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
             assertEquals(x, $value1$, "getAndSet $type$ value");
         }
 #end[CAS]
 
 #if[AtomicAdd]
-        hs.get(TestAccessMode.set).invokeExact(recv, $value1$);
+        hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
 
         // get and add, add and get
         {
-            $type$ o = ($type$) hs.get(TestAccessMode.getAndAdd).invokeExact(recv, $value3$);
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, $value3$);
             assertEquals(o, $value1$, "getAndAdd $type$");
-            $type$ c = ($type$) hs.get(TestAccessMode.addAndGet).invokeExact(recv, $value3$);
+            $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, $value3$);
             assertEquals(c, $value1$ + $value3$ + $value3$, "getAndAdd $type$ value");
         }
 #end[AtomicAdd]
@@ -253,19 +253,19 @@
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccess$Type$ recv, Handles hs) throws Throwable {
 #if[!CAS]
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.compareAndSet)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
             checkUOE(am, () -> {
                 boolean r = (boolean) hs.get(am).invokeExact(recv, $value1$, $value2$);
             });
         }
 
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.compareAndExchange)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
             checkUOE(am, () -> {
                 $type$ r = ($type$) hs.get(am).invokeExact(recv, $value1$, $value2$);
             });
         }
 
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.getAndSet)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
             checkUOE(am, () -> {
                 $type$ r = ($type$) hs.get(am).invokeExact(recv, $value1$);
             });
@@ -273,7 +273,7 @@
 #end[CAS]
 
 #if[!AtomicAdd]
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.getAndAdd)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
             checkUOE(am, () -> {
                 $type$ r = ($type$) hs.get(am).invokeExact(recv, $value1$);
             });
@@ -285,131 +285,131 @@
     static void testStaticField(Handles hs) throws Throwable {
         // Plain
         {
-            hs.get(TestAccessMode.set).invokeExact($value1$);
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value1$, "set $type$ value");
         }
 
 
         // Volatile
         {
-            hs.get(TestAccessMode.setVolatile).invokeExact($value2$);
-            $type$ x = ($type$) hs.get(TestAccessMode.getVolatile).invokeExact();
+            hs.get(TestAccessMode.SET_VOLATILE).invokeExact($value2$);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET_VOLATILE).invokeExact();
             assertEquals(x, $value2$, "setVolatile $type$ value");
         }
 
         // Lazy
         {
-            hs.get(TestAccessMode.setRelease).invokeExact($value1$);
-            $type$ x = ($type$) hs.get(TestAccessMode.getAcquire).invokeExact();
+            hs.get(TestAccessMode.SET_RELEASE).invokeExact($value1$);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET_ACQUIRE).invokeExact();
             assertEquals(x, $value1$, "setRelease $type$ value");
         }
 
         // Opaque
         {
-            hs.get(TestAccessMode.setOpaque).invokeExact($value2$);
-            $type$ x = ($type$) hs.get(TestAccessMode.getOpaque).invokeExact();
+            hs.get(TestAccessMode.SET_OPAQUE).invokeExact($value2$);
+            $type$ x = ($type$) hs.get(TestAccessMode.GET_OPAQUE).invokeExact();
             assertEquals(x, $value2$, "setOpaque $type$ value");
         }
 
 #if[CAS]
-        hs.get(TestAccessMode.set).invokeExact($value1$);
+        hs.get(TestAccessMode.SET).invokeExact($value1$);
 
         // Compare
         {
-            boolean r = (boolean) hs.get(TestAccessMode.compareAndSet).invokeExact($value1$, $value2$);
+            boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact($value1$, $value2$);
             assertEquals(r, true, "success compareAndSet $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value2$, "success compareAndSet $type$ value");
         }
 
         {
-            boolean r = (boolean) hs.get(TestAccessMode.compareAndSet).invokeExact($value1$, $value3$);
+            boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact($value1$, $value3$);
             assertEquals(r, false, "failing compareAndSet $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value2$, "failing compareAndSet $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeVolatile).invokeExact($value2$, $value1$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact($value2$, $value1$);
             assertEquals(r, $value2$, "success compareAndExchangeVolatile $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value1$, "success compareAndExchangeVolatile $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeVolatile).invokeExact($value2$, $value3$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact($value2$, $value3$);
             assertEquals(r, $value1$, "failing compareAndExchangeVolatile $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value1$, "failing compareAndExchangeVolatile $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeAcquire).invokeExact($value1$, $value2$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact($value1$, $value2$);
             assertEquals(r, $value1$, "success compareAndExchangeAcquire $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value2$, "success compareAndExchangeAcquire $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeAcquire).invokeExact($value1$, $value3$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact($value1$, $value3$);
             assertEquals(r, $value2$, "failing compareAndExchangeAcquire $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value2$, "failing compareAndExchangeAcquire $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeRelease).invokeExact($value2$, $value1$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact($value2$, $value1$);
             assertEquals(r, $value2$, "success compareAndExchangeRelease $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value1$, "success compareAndExchangeRelease $type$ value");
         }
 
         {
-            $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeRelease).invokeExact($value2$, $value3$);
+            $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact($value2$, $value3$);
             assertEquals(r, $value1$, "failing compareAndExchangeRelease $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value1$, "failing compareAndExchangeRelease $type$ value");
         }
 
         {
-            boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSet).invokeExact($value1$, $value2$);
+            boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact($value1$, $value2$);
             assertEquals(r, true, "weakCompareAndSet $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
         }
 
         {
-            boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSetAcquire).invokeExact($value2$, $value1$);
+            boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact($value2$, $value1$);
             assertEquals(r, true, "weakCompareAndSetAcquire $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value1$, "weakCompareAndSetAcquire $type$");
         }
 
         {
-            boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSetRelease).invokeExact( $value1$, $value2$);
+            boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact( $value1$, $value2$);
             assertEquals(r, true, "weakCompareAndSetRelease $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value2$, "weakCompareAndSetRelease $type$");
         }
 
         // Compare set and get
         {
-            $type$ o = ($type$) hs.get(TestAccessMode.getAndSet).invokeExact( $value1$);
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET).invokeExact( $value1$);
             assertEquals(o, $value2$, "getAndSet $type$");
-            $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact();
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value1$, "getAndSet $type$ value");
         }
 #end[CAS]
 
 #if[AtomicAdd]
-        hs.get(TestAccessMode.set).invokeExact($value1$);
+        hs.get(TestAccessMode.SET).invokeExact($value1$);
 
         // get and add, add and get
         {
-            $type$ o = ($type$) hs.get(TestAccessMode.getAndAdd).invokeExact( $value3$);
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( $value3$);
             assertEquals(o, $value1$, "getAndAdd $type$");
-            $type$ c = ($type$) hs.get(TestAccessMode.addAndGet).invokeExact($value3$);
+            $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact($value3$);
             assertEquals(c, $value1$ + $value3$ + $value3$, "getAndAdd $type$ value");
         }
 #end[AtomicAdd]
@@ -417,19 +417,19 @@
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
 #if[!CAS]
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.compareAndSet)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
             checkUOE(am, () -> {
                 boolean r = (boolean) hs.get(am).invokeExact($value1$, $value2$);
             });
         }
 
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.compareAndExchange)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
             checkUOE(am, () -> {
                 $type$ r = ($type$) hs.get(am).invokeExact($value1$, $value2$);
             });
         }
 
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.getAndSet)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
             checkUOE(am, () -> {
                 $type$ r = ($type$) hs.get(am).invokeExact($value1$);
             });
@@ -437,7 +437,7 @@
 #end[CAS]
 
 #if[!AtomicAdd]
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.getAndAdd)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
             checkUOE(am, () -> {
                 $type$ r = ($type$) hs.get(am).invokeExact($value1$);
             });
@@ -452,131 +452,131 @@
         for (int i = 0; i < array.length; i++) {
             // Plain
             {
-                hs.get(TestAccessMode.set).invokeExact(array, i, $value1$);
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value1$, "get $type$ value");
             }
 
 
             // Volatile
             {
-                hs.get(TestAccessMode.setVolatile).invokeExact(array, i, $value2$);
-                $type$ x = ($type$) hs.get(TestAccessMode.getVolatile).invokeExact(array, i);
+                hs.get(TestAccessMode.SET_VOLATILE).invokeExact(array, i, $value2$);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET_VOLATILE).invokeExact(array, i);
                 assertEquals(x, $value2$, "setVolatile $type$ value");
             }
 
             // Lazy
             {
-                hs.get(TestAccessMode.setRelease).invokeExact(array, i, $value1$);
-                $type$ x = ($type$) hs.get(TestAccessMode.getAcquire).invokeExact(array, i);
+                hs.get(TestAccessMode.SET_RELEASE).invokeExact(array, i, $value1$);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET_ACQUIRE).invokeExact(array, i);
                 assertEquals(x, $value1$, "setRelease $type$ value");
             }
 
             // Opaque
             {
-                hs.get(TestAccessMode.setOpaque).invokeExact(array, i, $value2$);
-                $type$ x = ($type$) hs.get(TestAccessMode.getOpaque).invokeExact(array, i);
+                hs.get(TestAccessMode.SET_OPAQUE).invokeExact(array, i, $value2$);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET_OPAQUE).invokeExact(array, i);
                 assertEquals(x, $value2$, "setOpaque $type$ value");
             }
 
 #if[CAS]
-            hs.get(TestAccessMode.set).invokeExact(array, i, $value1$);
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
 
             // Compare
             {
-                boolean r = (boolean) hs.get(TestAccessMode.compareAndSet).invokeExact(array, i, $value1$, $value2$);
+                boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(array, i, $value1$, $value2$);
                 assertEquals(r, true, "success compareAndSet $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value2$, "success compareAndSet $type$ value");
             }
 
             {
-                boolean r = (boolean) hs.get(TestAccessMode.compareAndSet).invokeExact(array, i, $value1$, $value3$);
+                boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(array, i, $value1$, $value3$);
                 assertEquals(r, false, "failing compareAndSet $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value2$, "failing compareAndSet $type$ value");
             }
 
             {
-                $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeVolatile).invokeExact(array, i, $value2$, $value1$);
+                $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(array, i, $value2$, $value1$);
                 assertEquals(r, $value2$, "success compareAndExchangeVolatile $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value1$, "success compareAndExchangeVolatile $type$ value");
             }
 
             {
-                $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeVolatile).invokeExact(array, i, $value2$, $value3$);
+                $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(array, i, $value2$, $value3$);
                 assertEquals(r, $value1$, "failing compareAndExchangeVolatile $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value1$, "failing compareAndExchangeVolatile $type$ value");
             }
 
             {
-                $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeAcquire).invokeExact(array, i, $value1$, $value2$);
+                $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(array, i, $value1$, $value2$);
                 assertEquals(r, $value1$, "success compareAndExchangeAcquire $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value2$, "success compareAndExchangeAcquire $type$ value");
             }
 
             {
-                $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeAcquire).invokeExact(array, i, $value1$, $value3$);
+                $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(array, i, $value1$, $value3$);
                 assertEquals(r, $value2$, "failing compareAndExchangeAcquire $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value2$, "failing compareAndExchangeAcquire $type$ value");
             }
 
             {
-                $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeRelease).invokeExact(array, i, $value2$, $value1$);
+                $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(array, i, $value2$, $value1$);
                 assertEquals(r, $value2$, "success compareAndExchangeRelease $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value1$, "success compareAndExchangeRelease $type$ value");
             }
 
             {
-                $type$ r = ($type$) hs.get(TestAccessMode.compareAndExchangeRelease).invokeExact(array, i, $value2$, $value3$);
+                $type$ r = ($type$) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(array, i, $value2$, $value3$);
                 assertEquals(r, $value1$, "failing compareAndExchangeRelease $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value1$, "failing compareAndExchangeRelease $type$ value");
             }
 
             {
-                boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSet).invokeExact(array, i, $value1$, $value2$);
+                boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, $value1$, $value2$);
                 assertEquals(r, true, "weakCompareAndSet $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
             }
 
             {
-                boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSetAcquire).invokeExact(array, i, $value2$, $value1$);
+                boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, $value2$, $value1$);
                 assertEquals(r, true, "weakCompareAndSetAcquire $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value1$, "weakCompareAndSetAcquire $type$");
             }
 
             {
-                boolean r = (boolean) hs.get(TestAccessMode.weakCompareAndSetRelease).invokeExact(array, i, $value1$, $value2$);
+                boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, $value1$, $value2$);
                 assertEquals(r, true, "weakCompareAndSetRelease $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value2$, "weakCompareAndSetRelease $type$");
             }
 
             // Compare set and get
             {
-                $type$ o = ($type$) hs.get(TestAccessMode.getAndSet).invokeExact(array, i, $value1$);
+                $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, $value1$);
                 assertEquals(o, $value2$, "getAndSet $type$");
-                $type$ x = ($type$) hs.get(TestAccessMode.get).invokeExact(array, i);
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value1$, "getAndSet $type$ value");
             }
 #end[CAS]
 
 #if[AtomicAdd]
-            hs.get(TestAccessMode.set).invokeExact(array, i, $value1$);
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
 
             // get and add, add and get
             {
-                $type$ o = ($type$) hs.get(TestAccessMode.getAndAdd).invokeExact(array, i, $value3$);
+                $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, $value3$);
                 assertEquals(o, $value1$, "getAndAdd $type$");
-                $type$ c = ($type$) hs.get(TestAccessMode.addAndGet).invokeExact(array, i, $value3$);
+                $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, $value3$);
                 assertEquals(c, $value1$ + $value3$ + $value3$, "getAndAdd $type$ value");
             }
 #end[AtomicAdd]
@@ -588,19 +588,19 @@
 
         final int i = 0;
 #if[!CAS]
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.compareAndSet)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
             checkUOE(am, () -> {
                 boolean r = (boolean) hs.get(am).invokeExact(array, i, $value1$, $value2$);
             });
         }
 
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.compareAndExchange)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
             checkUOE(am, () -> {
                 $type$ r = ($type$) hs.get(am).invokeExact(array, i, $value1$, $value2$);
             });
         }
 
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.getAndSet)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
             checkUOE(am, () -> {
                 $type$ r = ($type$) hs.get(am).invokeExact(array, i, $value1$);
             });
@@ -608,7 +608,7 @@
 #end[CAS]
 
 #if[!AtomicAdd]
-        for (TestAccessMode am : testAccessModesOfType(TestAccessType.getAndAdd)) {
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
             checkUOE(am, () -> {
                 $type$ o = ($type$) hs.get(am).invokeExact(array, i, $value1$);
             });
@@ -622,32 +622,32 @@
         for (int i : new int[]{-1, Integer.MIN_VALUE, 10, 11, Integer.MAX_VALUE}) {
             final int ci = i;
 
-            for (TestAccessMode am : testAccessModesOfType(TestAccessType.get)) {
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) {
                 checkIOOBE(am, () -> {
                     $type$ x = ($type$) hs.get(am).invokeExact(array, ci);
                 });
             }
 
-            for (TestAccessMode am : testAccessModesOfType(TestAccessType.set)) {
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) {
                 checkIOOBE(am, () -> {
                     hs.get(am).invokeExact(array, ci, $value1$);
                 });
             }
 
 #if[CAS]
-            for (TestAccessMode am : testAccessModesOfType(TestAccessType.compareAndSet)) {
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
                 checkIOOBE(am, () -> {
                     boolean r = (boolean) hs.get(am).invokeExact(array, ci, $value1$, $value2$);
                 });
             }
 
-            for (TestAccessMode am : testAccessModesOfType(TestAccessType.compareAndExchange)) {
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
                 checkIOOBE(am, () -> {
                     $type$ r = ($type$) hs.get(am).invokeExact(array, ci, $value2$, $value1$);
                 });
             }
 
-            for (TestAccessMode am : testAccessModesOfType(TestAccessType.getAndSet)) {
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
                 checkIOOBE(am, () -> {
                     $type$ o = ($type$) hs.get(am).invokeExact(array, ci, $value1$);
                 });
@@ -655,7 +655,7 @@
 #end[CAS]
 
 #if[AtomicAdd]
-            for (TestAccessMode am : testAccessModesOfType(TestAccessType.getAndAdd)) {
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
                 checkIOOBE(am, () -> {
                     $type$ o = ($type$) hs.get(am).invokeExact(array, ci, $value3$);
                 });