1 /* 2 * Copyright 2007-2008 Naoki NOSE. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package jp.liq.container; 17 18 import jp.liq.container.util.AbstractException; 19 20 /** 21 * jp.liq.containerパッケージで発生する例外です。 22 * @author nose 23 */ 24 public class ContainerException extends AbstractException { 25 26 /** 27 * 28 */ 29 private static final long serialVersionUID = 2270615910883838624L; 30 31 /** 32 * 例外の発生原因です。 33 * @author nosen 34 */ 35 public static enum Reason { 36 /** 37 * コンポーネントの循環参照。 38 */ 39 CIRCULAR_REFERENCE, 40 /** 41 * 指定されたコンポーネントが見つからない。 42 */ 43 COMPONENT_NOT_FOUND, 44 /** 45 * 重複したコンポーネントの登録 46 */ 47 DUPLICATE_REGISTRATION, 48 /** 49 * 依存関係が解決できない。 50 */ 51 MISSING_DEPENDENCY 52 } 53 /** 54 * この例外のインスタンスを構築します。 55 * @param errCode エラーコード 56 * @param args エラーメッセージに埋め込むパラメータ 57 */ 58 public ContainerException(Reason errCode, Object... args) { 59 super(errCode, args); 60 61 } 62 63 }