Package java.util
Class MissingResourceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.util.MissingResourceException
-
- All Implemented Interfaces:
Serializable
public class MissingResourceException extends RuntimeException
AMissingResourceExceptionis thrown by ResourceBundle when a resource bundle cannot be found or a resource is missing from a resource bundle.- See Also:
ResourceBundle,RuntimeException, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MissingResourceException(String detailMessage, String className, String resourceName)Constructs a newMissingResourceExceptionwith the stack trace, message, the class name of the resource bundle and the name of the missing resource filled in.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClassName()Returns the class name of the resource bundle from which a resource could not be found, or in the case of a missing resource, the name of the missing resource bundle.StringgetKey()Returns the name of the missing resource, or an empty string if the resource bundle is missing.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
MissingResourceException
public MissingResourceException(String detailMessage, String className, String resourceName)
Constructs a newMissingResourceExceptionwith the stack trace, message, the class name of the resource bundle and the name of the missing resource filled in.- Parameters:
detailMessage- the detail message for the exception.className- the class name of the resource bundle.resourceName- the name of the missing resource.
-
-
Method Detail
-
getClassName
public String getClassName()
Returns the class name of the resource bundle from which a resource could not be found, or in the case of a missing resource, the name of the missing resource bundle.- Returns:
- the class name of the resource bundle.
-
getKey
public String getKey()
Returns the name of the missing resource, or an empty string if the resource bundle is missing.- Returns:
- the name of the missing resource.
-
-