< prev index next >
src/java.base/share/classes/jdk/internal/reflect/NativeMethodAccessorImpl.java
Print this page
*** 23,35 ****
* questions.
*/
package jdk.internal.reflect;
- import java.lang.reflect.*;
import sun.reflect.misc.ReflectUtil;
/** Used only for the first few invocations of a Method; afterward,
switches to bytecode-based implementation */
class NativeMethodAccessorImpl extends MethodAccessorImpl {
private final Method method;
--- 23,36 ----
* questions.
*/
package jdk.internal.reflect;
import sun.reflect.misc.ReflectUtil;
+ import java.lang.reflect.*;
+
/** Used only for the first few invocations of a Method; afterward,
switches to bytecode-based implementation */
class NativeMethodAccessorImpl extends MethodAccessorImpl {
private final Method method;
*** 45,54 ****
--- 46,56 ----
{
// We can't inflate methods belonging to vm-anonymous classes because
// that kind of class can't be referred to by name, hence can't be
// found from the generated bytecode.
if (++numInvocations > ReflectionFactory.inflationThreshold()
+ && !method.getDeclaringClass().isHiddenClass()
&& !ReflectUtil.isVMAnonymousClass(method.getDeclaringClass())) {
MethodAccessorImpl acc = (MethodAccessorImpl)
new MethodAccessorGenerator().
generateMethod(method.getDeclaringClass(),
method.getName(),
< prev index next >