| Line | Hits | Source |
|---|---|---|
| 1 | /* | |
| 2 | Chrysalis Web Framework [http://chrysalis.sourceforge.net] | |
| 3 | Copyright (c) 2002, 2003, 2004, Paul Strack | |
| 4 | ||
| 5 | All rights reserved. | |
| 6 | ||
| 7 | Redistribution and use in source and binary forms, with or without | |
| 8 | modification, are permitted provided that the following conditions are met: | |
| 9 | ||
| 10 | 1. Redistributions of source code must retain the above copyright notice, this | |
| 11 | list of conditions and the following disclaimer. | |
| 12 | ||
| 13 | 2. Redistributions in binary form must reproduce the above copyright notice, | |
| 14 | this list of conditions and the following disclaimer in the documentation | |
| 15 | and/or other materials provided with the distribution. | |
| 16 | ||
| 17 | 3. Neither the name of the copyright holder nor the names of its contributors | |
| 18 | may be used to endorse or promote products derived from this software without | |
| 19 | specific prior written permission. | |
| 20 | ||
| 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | |
| 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | |
| 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
| 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
| 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 31 | */ | |
| 32 | ||
| 33 | package org.chwf.registry; | |
| 34 | ||
| 35 | import java.text.MessageFormat; | |
| 36 | ||
| 37 | import org.chwf.config.Config; | |
| 38 | import org.chwf.config.ConfigFactory; | |
| 39 | ||
| 40 | /** | |
| 41 | * Exception for registry-related errors. | |
| 42 | * | |
| 43 | * @author <a href="mailto:pfstrack@users.sourceforge.net">Paul Strack</a> | |
| 44 | */ | |
| 45 | 1 | public class RegistryException extends RuntimeException { |
| 46 | ||
| 47 | /** Configuration. */ | |
| 48 | 2 | private static final Config CONFIG = |
| 49 | ConfigFactory.getConfig(RegistryException.class); | |
| 50 | ||
| 51 | /** Empty object array. */ | |
| 52 | 1 | private static final Object[] NO_ARGUMENTS = new Object[0]; |
| 53 | ||
| 54 | /** | |
| 55 | * Constructor for RegistryException.<p> | |
| 56 | * | |
| 57 | * @param pattern The error message pattern. | |
| 58 | */ | |
| 59 | public RegistryException(String pattern) { | |
| 60 | 7 | super(CONFIG.get(pattern, pattern)); |
| 61 | 7 | } |
| 62 | ||
| 63 | /** | |
| 64 | * Constructor for RegistryException.<p> | |
| 65 | * | |
| 66 | * @param pattern The error message pattern. | |
| 67 | * @param arguments The pattern arguments. | |
| 68 | */ | |
| 69 | public RegistryException(String pattern, Object[] arguments) { | |
| 70 | 2 | super(MessageFormat.format(CONFIG.get(pattern, pattern), arguments)); |
| 71 | 2 | } |
| 72 | ||
| 73 | /** Message key. */ | |
| 74 | static final String MESSAGE_NOT_INITIALIZED = "NOT_INITIALIZED"; | |
| 75 | ||
| 76 | /** Message key. */ | |
| 77 | static final String MESSAGE_ILLEGAL_OVERWRITE = "ILLEGAL_OVERWRITE"; | |
| 78 | ||
| 79 | /** Message key. */ | |
| 80 | static final String MESSAGE_NO_PUBLIC_SINGLETON_CONSTRUCTOR = | |
| 81 | "NO_PUBLIC_SINGLETON_CONSTRUCTOR"; | |
| 82 | ||
| 83 | /** Message key. */ | |
| 84 | static final String MESSAGE_SINGLETON_CONSTRUCTOR_FAILED = | |
| 85 | "SINGLETON_CONSTRUCTOR_FAILED"; | |
| 86 | ||
| 87 | /** Message key. */ | |
| 88 | static final String MESSAGE_GLOBAL_REGISTRY_INITIALIZED = | |
| 89 | "GLOBAL_REGISTRY_INITIALIZED"; | |
| 90 | ||
| 91 | /** Message key. */ | |
| 92 | static final String MESSAGE_SINGLETON_CLASS_NOT_FOUND = | |
| 93 | "SINGLETON_CLASS_NOT_FOUND"; | |
| 94 | } |
|
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |