< prev index next >

test/runtime/valhalla/nestmates/p2/MethodHandleSubTop.java

Print this page

        

*** 29,40 **** import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; public class MethodHandleSubTop extends Sup { ! private final MethodHandles.Lookup METHOD_HANDLE_LOOKUP = MethodHandles.lookup(); ! private final MethodType METHOD_TYPE = MethodType.methodType(int.class); // verify access check to a "super" method, method can be used in positive and negative test case public MethodHandle getSuperMethodMH(String methodName) throws NoSuchMethodException, IllegalAccessException { return METHOD_HANDLE_LOOKUP.findVirtual(this.getClass(), methodName, METHOD_TYPE); } --- 29,40 ---- import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; public class MethodHandleSubTop extends Sup { ! final MethodHandles.Lookup METHOD_HANDLE_LOOKUP = MethodHandles.lookup(); ! final MethodType METHOD_TYPE = MethodType.methodType(int.class); // verify access check to a "super" method, method can be used in positive and negative test case public MethodHandle getSuperMethodMH(String methodName) throws NoSuchMethodException, IllegalAccessException { return METHOD_HANDLE_LOOKUP.findVirtual(this.getClass(), methodName, METHOD_TYPE); }
< prev index next >