< prev index next >

src/java.base/share/classes/java/lang/reflect/Field.java

Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd

@@ -166,11 +166,11 @@
     @Override
     @CallerSensitive
     public void setAccessible(boolean flag) {
         AccessibleObject.checkPermission();
 
-        if (clazz.isValue()) {
+        if (clazz.isInlineClass()) {
             throw new InaccessibleObjectException("cannot make a field accessible of inline class "
                     + clazz.getName());
         }
         if (flag) {
             checkCanSetAccessible(Reflection.getCallerClass());

@@ -182,12 +182,11 @@
     void checkCanSetAccessible(Class<?> caller) {
         checkCanSetAccessible(caller, clazz);
     }
 
     /**
-     * Returns the {@code Class} object representing
-     * {@linkplain Class#asBoxType() the box type} of the class or interface
+     * Returns the {@code Class} object representing the class or interface
      * that declares the field represented by this {@code Field} object.
      */
     @Override
     public Class<?> getDeclaringClass() {
         return clazz;

@@ -1105,11 +1104,11 @@
 
     /*
      * Ensure the declaring class is not an inline class.
      */
     private void ensureNotValueClass() throws IllegalAccessException {
-        if (clazz.isValue()) {
+        if (clazz.isInlineClass()) {
             throw new IllegalAccessException("cannot set field \"" + this + "\" of inline class "
                 + clazz.getName());
         }
     }
 
< prev index next >