Created
September 19, 2022 01:43
-
-
Save lprimak/1aad4199cccafad3efbab8623844dc09 to your computer and use it in GitHub Desktop.
calling private methods w/MethodHandles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lookup = MethodHandles.privateLookupIn(EagerBeansWebListener.class, MethodHandles.lookup()); | |
var mh = lookup.findStatic(EagerBeansWebListener.class, "disable", MethodType.methodType(void.class)); | |
mh.invokeExact(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment