< prev index next >

src/java.base/share/classes/jdk/internal/reflect/NativeConstructorAccessorImpl.java

Print this page
rev 58760 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: alanb, cjplummer, coleenp, dholmes, dlong, forax, jlahoda, psandoz, plevart, vromero
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com, jan.lahoda@oracle.com, amy.lu@oracle.com

*** 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 Constructor; afterward, switches to bytecode-based implementation */ class NativeConstructorAccessorImpl extends ConstructorAccessorImpl { private final Constructor<?> c; --- 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 Constructor; afterward, switches to bytecode-based implementation */ class NativeConstructorAccessorImpl extends ConstructorAccessorImpl { private final Constructor<?> c;
*** 47,56 **** --- 48,58 ---- { // We can't inflate a constructor belonging to a vm-anonymous class // 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() + && !c.getDeclaringClass().isHidden() && !ReflectUtil.isVMAnonymousClass(c.getDeclaringClass())) { ConstructorAccessorImpl acc = (ConstructorAccessorImpl) new MethodAccessorGenerator(). generateConstructor(c.getDeclaringClass(), c.getParameterTypes(),
< prev index next >