1. /*
  2. * @(#)IllegalAccessException.java 1.7 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.lang;
  8. /**
  9. * Thrown when an application tries to load in a class through its
  10. * string name using:
  11. * <ul>
  12. * <li>The <code>forName</code> method in class <code>Class</code>.
  13. * <li>The <code>findSystemClass</code> method in class
  14. * <code>ClassLoader</code>.
  15. * <li>The <code>loadClass</code> method in class <code>ClassLoader</code>.
  16. * </ul>
  17. * <p>
  18. * but the currently executing method does not have access to the
  19. * definition of the specified class, because the class is not public
  20. * and in another package.
  21. * <p>
  22. * An instance of this class can also be thrown when an application
  23. * tries to create an instance of a class using the
  24. * <code>newInstance</code> method in class <code>Class</code>, but
  25. * the current method does not have access to the appropriate
  26. * zero-argument constructor.
  27. *
  28. * @author unascribed
  29. * @version 1.7, 11/29/01
  30. * @see java.lang.Class#forName(java.lang.String)
  31. * @see java.lang.Class#newInstance()
  32. * @see java.lang.ClassLoader#findSystemClass(java.lang.String)
  33. * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean)
  34. * @since JDK1.0
  35. */
  36. public
  37. class IllegalAccessException extends Exception {
  38. /**
  39. * Constructs an <code>IllegalAccessException</code> without a
  40. * detail message.
  41. */
  42. public IllegalAccessException() {
  43. super();
  44. }
  45. /**
  46. * Constructs an <code>IllegalAccessException</code> with a detail message.
  47. *
  48. * @param s the detail message.
  49. */
  50. public IllegalAccessException(String s) {
  51. super(s);
  52. }
  53. }