< prev index next >

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

Print this page

        

@@ -722,11 +722,13 @@
      * {@code IllegalAccessException}.
      *
      * <p>If the underlying field is final, the method throws an
      * {@code IllegalAccessException} unless {@code setAccessible(true)}
      * has succeeded for this {@code Field} object
-     * and the field is non-static. Setting a final field in this way
+     * and the field is non-static and its declaring class is not
+     * a {@linkplain Class#isHiddenClass() hidden} class.
+     * Setting a final field in this way
      * is meaningful only during deserialization or reconstruction of
      * instances of classes with blank final fields, before they are
      * made available for access by other parts of a program. Use in
      * any other context may have unpredictable effects, including cases
      * in which other parts of a program continue to use the original
< prev index next >