Access non-public (java-native) classes from JDK (7)
问题 I want to use the method MethodHandleNatives.getTargetMethod(MethodHandle)AccessibleObject. The class MethodHandleNatives is not public. So does anybody know how I can do that? I know that its possible to access private methods and fields via reflections, so I am asking, if this is also possible. Thanks. 回答1: I have found a solution. It is not straight forward but it works =) MethodHandle mh; // a MethodHandle Object Class<?> mhn; try { mhn = Class.forName("java.lang.invoke