/* * Copyright 2004-2006 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.framework.container; /** * Hot deployおよびCool deployにおいて、 クラス情報から{@link ComponentDef コンポーネント定義}を作成するためのインターフェースです。 *

* コンポーネント定義に含まれるコンポーネント名やクラス定義は、 * {@link org.seasar.framework.convention.NamingConvention 命名規則}に従って解決されます。 *

* * @author higa * @author jundu (Javadoc) */ public interface ComponentCreator { /** * 指定されたクラスから、 命名規則に従ってコンポーネント定義を作成します。 * * @param componentClass * コンポーネント定義を作成する対象のクラス * @return 作成されたコンポーネント定義 */ ComponentDef createComponentDef(Class componentClass); /** * 指定されたコンポーネント名から、 命名規則に従ってコンポーネント定義を作成します。 指定するコンポーネント名からクラスを見つけ出すため、 * コンポーネント名も命名規則にしたがっている必要があります。 * * @param componentName * コンポーネント定義を作成する対象のコンポーネント名 * @return 作成されたコンポーネント定義。 コンポーネント名に対応するクラスが存在しない場合は、 nullを返す * @throws org.seasar.framework.exception.EmptyRuntimeException * コンポーネント名にnullを指定した場合 * * @see org.seasar.framework.convention.NamingConvention#fromComponentNameToClass(String) */ ComponentDef createComponentDef(String componentName); }