home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / java / util / MissingResourceException.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  2.6 KB  |  87 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)MissingResourceException.java    1.9 98/09/21
  3.  *
  4.  * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
  5.  * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
  6.  *
  7.  * Portions copyright (c) 1996-1998 Sun Microsystems, Inc.
  8.  * All Rights Reserved.
  9.  *
  10.  * The original version of this source code and documentation
  11.  * is copyrighted and owned by Taligent, Inc., a wholly-owned
  12.  * subsidiary of IBM. These materials are provided under terms
  13.  * of a License Agreement between Taligent and Sun. This technology
  14.  * is protected by multiple US and International patents.
  15.  *
  16.  * This notice and attribution to Taligent may not be removed.
  17.  * Taligent is a registered trademark of Taligent, Inc.
  18.  *
  19.  * Permission to use, copy, modify, and distribute this software
  20.  * and its documentation for NON-COMMERCIAL purposes and without
  21.  * fee is hereby granted provided that this copyright notice
  22.  * appears in all copies. Please refer to the file "copyright.html"
  23.  * for further important copyright and licensing information.
  24.  *
  25.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  26.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  27.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  28.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  29.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  30.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  31.  *
  32.  */
  33.  
  34. package java.util;
  35.  
  36. /**
  37.  * Signals that a resource is missing.
  38.  * @see java.io.Exception
  39.  * @see ResourceBundle
  40.  * @version     1.9, 09/21/98
  41.  * @author      Mark Davis
  42.  */
  43. public
  44. class MissingResourceException extends RuntimeException {
  45.  
  46.     /**
  47.      * Constructs a MissingResourceException with the specified information.
  48.      * A detail message is a String that describes this particular exception.
  49.      * @param s the detail message
  50.      * @param classname the name of the resource class
  51.      * @param key the key for the missing resource.
  52.      */
  53.     public MissingResourceException(String s, String className, String key) {
  54.         super(s);
  55.         this.className = className;
  56.         this.key = key;
  57.     }
  58.  
  59.     /**
  60.      * Gets parameter passed by constructor.
  61.      */
  62.     public String getClassName() {
  63.         return className;
  64.     }
  65.  
  66.     /**
  67.      * Gets parameter passed by constructor.
  68.      */
  69.     public String getKey() {
  70.         return key;
  71.     }
  72.  
  73.     //============ privates ============
  74.  
  75.     /**
  76.      * The class name of the resource bundle requested by the user.
  77.      * @serial
  78.      */
  79.     private String className;
  80.  
  81.     /**
  82.      * The name of the specific resource requested by the user.
  83.      * @serial
  84.      */
  85.     private String key;
  86. }
  87.