< prev index next >

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

Print this page




  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 tries to access or modify a specified
  30  * field of an object, and that object no longer has that field.
  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
  40 class NoSuchFieldError extends IncompatibleClassChangeError {

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


  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 tries to access or modify a specified
  30  * field of an object, and that object no longer has that field.
  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
  40 class NoSuchFieldError extends IncompatibleClassChangeError {
  41     @java.io.Serial
  42     private static final long serialVersionUID = -3456430195886129035L;
  43 
  44     /**
  45      * Constructs a <code>NoSuchFieldError</code> with no detail message.
  46      */
  47     public NoSuchFieldError() {
  48         super();
  49     }
  50 
  51     /**
  52      * Constructs a <code>NoSuchFieldError</code> with the specified
  53      * detail message.
  54      *
  55      * @param   s   the detail message.
  56      */
  57     public NoSuchFieldError(String s) {
  58         super(s);
  59     }
  60 }
< prev index next >