< prev index next >

test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java

Print this page

488      * verify it matches the given value in content.
489      */
490     private static void assertClassData(Lookup lookup, Object[] value) throws ReflectiveOperationException {
491         Class<?> c = lookup.lookupClass();
492         Method m = c.getMethod("classData");
493         Object v = m.invoke(null);
494         assertArrayEquals(value, (Object[]) v);
495     }
496 
497     /*
498      * Load an Object from class data via condy and
499      * verify it matches the given value.
500      */
501     private static void assertClassData(Lookup lookup, Object o, Object value) throws ReflectiveOperationException {
502         Class<?> c = lookup.lookupClass();
503         Method m = c.getMethod("classData");
504         Object v = m.invoke(o);
505         assertEquals(value, v);
506     }
507 }
508 
509 

488      * verify it matches the given value in content.
489      */
490     private static void assertClassData(Lookup lookup, Object[] value) throws ReflectiveOperationException {
491         Class<?> c = lookup.lookupClass();
492         Method m = c.getMethod("classData");
493         Object v = m.invoke(null);
494         assertArrayEquals(value, (Object[]) v);
495     }
496 
497     /*
498      * Load an Object from class data via condy and
499      * verify it matches the given value.
500      */
501     private static void assertClassData(Lookup lookup, Object o, Object value) throws ReflectiveOperationException {
502         Class<?> c = lookup.lookupClass();
503         Method m = c.getMethod("classData");
504         Object v = m.invoke(o);
505         assertEquals(value, v);
506     }
507 }


< prev index next >