31 * <ul>
32 * <li>The <code>forName</code> method in class <code>Class</code>.
33 * <li>The <code>findSystemClass</code> method in class
34 * <code>ClassLoader</code> .
35 * <li>The <code>loadClass</code> method in class <code>ClassLoader</code>.
36 * </ul>
37 * <p>
38 * but no definition for the class with the specified name could be found.
39 *
40 * <p>As of release 1.4, this exception has been retrofitted to conform to
41 * the general purpose exception-chaining mechanism. The "optional exception
42 * that was raised while loading the class" that may be provided at
43 * construction time and accessed via the {@link #getException()} method is
44 * now known as the <i>cause</i>, and may be accessed via the {@link
45 * Throwable#getCause()} method, as well as the aforementioned "legacy method."
46 *
47 * @author unascribed
48 * @see java.lang.Class#forName(java.lang.String)
49 * @see java.lang.ClassLoader#findSystemClass(java.lang.String)
50 * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean)
51 * @since JDK1.0
52 */
53 public class ClassNotFoundException extends ReflectiveOperationException {
54 /**
55 * use serialVersionUID from JDK 1.1.X for interoperability
56 */
57 private static final long serialVersionUID = 9176873029745254542L;
58
59 /**
60 * This field holds the exception ex if the
61 * ClassNotFoundException(String s, Throwable ex) constructor was
62 * used to instantiate the object
63 * @serial
64 * @since 1.2
65 */
66 private Throwable ex;
67
68 /**
69 * Constructs a <code>ClassNotFoundException</code> with no detail message.
70 */
71 public ClassNotFoundException() {
|
31 * <ul>
32 * <li>The <code>forName</code> method in class <code>Class</code>.
33 * <li>The <code>findSystemClass</code> method in class
34 * <code>ClassLoader</code> .
35 * <li>The <code>loadClass</code> method in class <code>ClassLoader</code>.
36 * </ul>
37 * <p>
38 * but no definition for the class with the specified name could be found.
39 *
40 * <p>As of release 1.4, this exception has been retrofitted to conform to
41 * the general purpose exception-chaining mechanism. The "optional exception
42 * that was raised while loading the class" that may be provided at
43 * construction time and accessed via the {@link #getException()} method is
44 * now known as the <i>cause</i>, and may be accessed via the {@link
45 * Throwable#getCause()} method, as well as the aforementioned "legacy method."
46 *
47 * @author unascribed
48 * @see java.lang.Class#forName(java.lang.String)
49 * @see java.lang.ClassLoader#findSystemClass(java.lang.String)
50 * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean)
51 * @since 1.0
52 */
53 public class ClassNotFoundException extends ReflectiveOperationException {
54 /**
55 * use serialVersionUID from JDK 1.1.X for interoperability
56 */
57 private static final long serialVersionUID = 9176873029745254542L;
58
59 /**
60 * This field holds the exception ex if the
61 * ClassNotFoundException(String s, Throwable ex) constructor was
62 * used to instantiate the object
63 * @serial
64 * @since 1.2
65 */
66 private Throwable ex;
67
68 /**
69 * Constructs a <code>ClassNotFoundException</code> with no detail message.
70 */
71 public ClassNotFoundException() {
|