< prev index next >
src/java.base/share/classes/java/lang/reflect/Constructor.java
Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd
@@ -178,11 +178,11 @@
@CallerSensitive
public void setAccessible(boolean flag) {
AccessibleObject.checkPermission();
if (flag) {
- if (clazz.isValue()) {
+ if (clazz.isInlineClass()) {
throw new InaccessibleObjectException(
"Unable to make an inline class constructor \"" + this + "\" accessible");
}
checkCanSetAccessible(Reflection.getCallerClass());
}
@@ -208,12 +208,11 @@
byte[] getAnnotationBytes() {
return annotations;
}
/**
- * Returns the {@code Class} object representing
- * {@linkplain Class#asBoxType() the box type} of the class that
+ * Returns the {@code Class} object representing the class that
* declares the constructor represented by this object.
*/
@Override
public Class<T> getDeclaringClass() {
return clazz;
@@ -481,11 +480,11 @@
@ForceInline // to ensure Reflection.getCallerClass optimization
public T newInstance(Object ... initargs)
throws InstantiationException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException
{
- if (clazz.isValue()) {
+ if (clazz.isInlineClass()) {
throw new IllegalAccessException(
"cannot create new instance of an inline class " + clazz.getName());
}
Class<?> caller = override ? null : Reflection.getCallerClass();
return newInstanceWithCaller(initargs, !override, caller);
< prev index next >