jtulach@1334: /* jtulach@1334: * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. jtulach@1334: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jtulach@1334: * jtulach@1334: * This code is free software; you can redistribute it and/or modify it jtulach@1334: * under the terms of the GNU General Public License version 2 only, as jtulach@1334: * published by the Free Software Foundation. Oracle designates this jtulach@1334: * particular file as subject to the "Classpath" exception as provided jtulach@1334: * by Oracle in the LICENSE file that accompanied this code. jtulach@1334: * jtulach@1334: * This code is distributed in the hope that it will be useful, but WITHOUT jtulach@1334: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jtulach@1334: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jtulach@1334: * version 2 for more details (a copy is included in the LICENSE file that jtulach@1334: * accompanied this code). jtulach@1334: * jtulach@1334: * You should have received a copy of the GNU General Public License version jtulach@1334: * 2 along with this work; if not, write to the Free Software Foundation, jtulach@1334: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jtulach@1334: * jtulach@1334: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jtulach@1334: * or visit www.oracle.com if you need additional information or have any jtulach@1334: * questions. jtulach@1334: */ jtulach@1334: jtulach@1334: /* jtulach@1334: * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved jtulach@1334: * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved jtulach@1334: * jtulach@1334: * The original version of this source code and documentation jtulach@1334: * is copyrighted and owned by Taligent, Inc., a wholly-owned jtulach@1334: * subsidiary of IBM. These materials are provided under terms jtulach@1334: * of a License Agreement between Taligent and Sun. This technology jtulach@1334: * is protected by multiple US and International patents. jtulach@1334: * jtulach@1334: * This notice and attribution to Taligent may not be removed. jtulach@1334: * Taligent is a registered trademark of Taligent, Inc. jtulach@1334: * jtulach@1334: */ jtulach@1334: jtulach@1334: package java.util; jtulach@1334: jtulach@1334: /** jtulach@1334: * Signals that a resource is missing. jtulach@1334: * @see java.lang.Exception jtulach@1334: * @see ResourceBundle jtulach@1334: * @author Mark Davis jtulach@1334: * @since JDK1.1 jtulach@1334: */ jtulach@1334: public jtulach@1334: class MissingResourceException extends RuntimeException { jtulach@1334: jtulach@1334: /** jtulach@1334: * Constructs a MissingResourceException with the specified information. jtulach@1334: * A detail message is a String that describes this particular exception. jtulach@1334: * @param s the detail message jtulach@1334: * @param className the name of the resource class jtulach@1334: * @param key the key for the missing resource. jtulach@1334: */ jtulach@1334: public MissingResourceException(String s, String className, String key) { jtulach@1334: super(s); jtulach@1334: this.className = className; jtulach@1334: this.key = key; jtulach@1334: } jtulach@1334: jtulach@1334: /** jtulach@1334: * Constructs a MissingResourceException with jtulach@1334: * message, className, key, jtulach@1334: * and cause. This constructor is package private for jtulach@1334: * use by ResourceBundle.getBundle. jtulach@1334: * jtulach@1334: * @param message jtulach@1334: * the detail message jtulach@1334: * @param className jtulach@1334: * the name of the resource class jtulach@1334: * @param key jtulach@1334: * the key for the missing resource. jtulach@1334: * @param cause jtulach@1334: * the cause (which is saved for later retrieval by the jtulach@1334: * {@link Throwable.getCause()} method). (A null value is jtulach@1334: * permitted, and indicates that the cause is nonexistent jtulach@1334: * or unknown.) jtulach@1334: */ jtulach@1334: MissingResourceException(String message, String className, String key, Throwable cause) { jtulach@1334: super(message, cause); jtulach@1334: this.className = className; jtulach@1334: this.key = key; jtulach@1334: } jtulach@1334: jtulach@1334: /** jtulach@1334: * Gets parameter passed by constructor. jtulach@1334: * jtulach@1334: * @return the name of the resource class jtulach@1334: */ jtulach@1334: public String getClassName() { jtulach@1334: return className; jtulach@1334: } jtulach@1334: jtulach@1334: /** jtulach@1334: * Gets parameter passed by constructor. jtulach@1334: * jtulach@1334: * @return the key for the missing resource jtulach@1334: */ jtulach@1334: public String getKey() { jtulach@1334: return key; jtulach@1334: } jtulach@1334: jtulach@1334: //============ privates ============ jtulach@1334: jtulach@1334: // serialization compatibility with JDK1.1 jtulach@1334: private static final long serialVersionUID = -4876345176062000401L; jtulach@1334: jtulach@1334: /** jtulach@1334: * The class name of the resource bundle requested by the user. jtulach@1334: * @serial jtulach@1334: */ jtulach@1334: private String className; jtulach@1334: jtulach@1334: /** jtulach@1334: * The name of the specific resource requested by the user. jtulach@1334: * @serial jtulach@1334: */ jtulach@1334: private String key; jtulach@1334: }