< prev index next >

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

Print this page

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

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


< prev index next >