1. /*
  2. * @(#)MissingResourceException.java 1.12 00/01/19
  3. *
  4. * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. /*
  11. * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
  12. * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
  13. *
  14. * The original version of this source code and documentation
  15. * is copyrighted and owned by Taligent, Inc., a wholly-owned
  16. * subsidiary of IBM. These materials are provided under terms
  17. * of a License Agreement between Taligent and Sun. This technology
  18. * is protected by multiple US and International patents.
  19. *
  20. * This notice and attribution to Taligent may not be removed.
  21. * Taligent is a registered trademark of Taligent, Inc.
  22. *
  23. */
  24. package java.util;
  25. /**
  26. * Signals that a resource is missing.
  27. * @see java.lang.Exception
  28. * @see ResourceBundle
  29. * @version 1.12, 01/19/00
  30. * @author Mark Davis
  31. * @since JDK1.1
  32. */
  33. public
  34. class MissingResourceException extends RuntimeException {
  35. /**
  36. * Constructs a MissingResourceException with the specified information.
  37. * A detail message is a String that describes this particular exception.
  38. * @param s the detail message
  39. * @param classname the name of the resource class
  40. * @param key the key for the missing resource.
  41. */
  42. public MissingResourceException(String s, String className, String key) {
  43. super(s);
  44. this.className = className;
  45. this.key = key;
  46. }
  47. /**
  48. * Gets parameter passed by constructor.
  49. */
  50. public String getClassName() {
  51. return className;
  52. }
  53. /**
  54. * Gets parameter passed by constructor.
  55. */
  56. public String getKey() {
  57. return key;
  58. }
  59. //============ privates ============
  60. /**
  61. * The class name of the resource bundle requested by the user.
  62. * @serial
  63. */
  64. private String className;
  65. /**
  66. * The name of the specific resource requested by the user.
  67. * @serial
  68. */
  69. private String key;
  70. }