< prev index next >

src/java.base/share/classes/java/lang/IllegalAccessError.java

Print this page




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang;
  27 
  28 /**
  29  * Thrown if an application attempts to access or modify a field, or
  30  * to call a method that it does not have access to.
  31  * <p>
  32  * Normally, this error is caught by the compiler; this error can
  33  * only occur at run time if the definition of a class has
  34  * incompatibly changed.
  35  *
  36  * @author  unascribed
  37  * @since   1.0
  38  */
  39 public class IllegalAccessError extends IncompatibleClassChangeError {

  40     private static final long serialVersionUID = -8988904074992417891L;
  41 
  42     /**
  43      * Constructs an <code>IllegalAccessError</code> with no detail message.
  44      */
  45     public IllegalAccessError() {
  46         super();
  47     }
  48 
  49     /**
  50      * Constructs an <code>IllegalAccessError</code> with the specified
  51      * detail message.
  52      *
  53      * @param   s   the detail message.
  54      */
  55     public IllegalAccessError(String s) {
  56         super(s);
  57     }
  58 }


  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang;
  27 
  28 /**
  29  * Thrown if an application attempts to access or modify a field, or
  30  * to call a method that it does not have access to.
  31  * <p>
  32  * Normally, this error is caught by the compiler; this error can
  33  * only occur at run time if the definition of a class has
  34  * incompatibly changed.
  35  *
  36  * @author  unascribed
  37  * @since   1.0
  38  */
  39 public class IllegalAccessError extends IncompatibleClassChangeError {
  40     @java.io.Serial
  41     private static final long serialVersionUID = -8988904074992417891L;
  42 
  43     /**
  44      * Constructs an <code>IllegalAccessError</code> with no detail message.
  45      */
  46     public IllegalAccessError() {
  47         super();
  48     }
  49 
  50     /**
  51      * Constructs an <code>IllegalAccessError</code> with the specified
  52      * detail message.
  53      *
  54      * @param   s   the detail message.
  55      */
  56     public IllegalAccessError(String s) {
  57         super(s);
  58     }
  59 }
< prev index next >