1 |
/* java.util.MissingResourceException |
/* MissingResourceException.java -- thrown for a missing resource |
2 |
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. |
Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
38 |
|
|
39 |
package java.util; |
package java.util; |
40 |
|
|
|
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 |
|
|
* "The Java Language Specification", ISBN 0-201-63451-1 |
|
|
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com. |
|
|
* Status: Believed complete and correct. |
|
|
*/ |
|
|
|
|
41 |
/** |
/** |
42 |
* This exception is thrown when a resource is missing. |
* This exception is thrown when a resource is missing. |
43 |
* |
* |
|
* @see ResourceBundle |
|
44 |
* @author Jochen Hoenicke |
* @author Jochen Hoenicke |
45 |
* @author Warren Levy <warrenl@cygnus.com> |
* @author Warren Levy <warrenl@cygnus.com> |
46 |
|
* @see ResourceBundle |
47 |
|
* @since 1.1 |
48 |
|
* @status updated to 1.4 |
49 |
*/ |
*/ |
50 |
public class MissingResourceException extends RuntimeException |
public class MissingResourceException extends RuntimeException |
51 |
{ |
{ |
52 |
|
/** |
53 |
|
* Compatible with JDK 1.1+. |
54 |
|
*/ |
55 |
private static final long serialVersionUID = -4876345176062000401L; |
private static final long serialVersionUID = -4876345176062000401L; |
56 |
|
|
57 |
/** |
/** |
58 |
* The name of the resource bundle requested by user. |
* The name of the resource bundle requested by user. |
59 |
|
* |
60 |
|
* @serial the class name of the resource bundle |
61 |
*/ |
*/ |
62 |
private String className; |
private final String className; |
63 |
|
|
64 |
/** |
/** |
65 |
* The key of the resource in the bundle requested by user. |
* The key of the resource in the bundle requested by user. |
66 |
|
* |
67 |
|
* @serial the name of the resouce |
68 |
*/ |
*/ |
69 |
private String key; |
private final String key; |
70 |
|
|
71 |
/** |
/** |
72 |
* Creates a new exception, with the specified parameters. |
* Creates a new exception, with the specified parameters. |
73 |
* @param s the detail message. |
* |
74 |
* @param className the name of the resource bundle. |
* @param s the detail message |
75 |
* @param key the key of the missing resource. |
* @param className the name of the resource bundle |
76 |
|
* @param key the key of the missing resource |
77 |
*/ |
*/ |
78 |
public MissingResourceException(String s, String className, String key) |
public MissingResourceException(String s, String className, String key) |
79 |
{ |
{ |
84 |
|
|
85 |
/** |
/** |
86 |
* Gets the name of the resource bundle, for which a resource is missing. |
* Gets the name of the resource bundle, for which a resource is missing. |
87 |
* @return the name of the resource bundle. |
* |
88 |
|
* @return the name of the resource bundle |
89 |
*/ |
*/ |
90 |
public String getClassName() |
public String getClassName() |
91 |
{ |
{ |
95 |
/** |
/** |
96 |
* Gets the key of the resource that is missing bundle, this is an empty |
* Gets the key of the resource that is missing bundle, this is an empty |
97 |
* string if the whole resource bundle is missing. |
* string if the whole resource bundle is missing. |
98 |
* @return the name of the resource bundle. |
* |
99 |
|
* @return the name of the resource bundle |
100 |
*/ |
*/ |
101 |
public String getKey() |
public String getKey() |
102 |
{ |
{ |