/* * 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; /** * アクセスタイプの定義です。自身のアクセスタイプに基づいたコンポーネントバインディング機能も提供します。 *

* アクセスタイプとは、フィールド(インスタンス変数/クラス変数)へのアクセス方法です。 アクセスタイプ には、 propertyタイプ * と fieldタイプ の2種類があります。 propertyタイプ * は、Beanプロパティ(getter/setter)によるアクセスを表します。fieldタイプ * は、フィールドへの直接アクセスを表します。 *

* AccessTypeDefは、{@link PropertyDef}の属性です。 * * @author koichik * @author belltree (Javadoc) * * @see PropertyDef */ public interface AccessTypeDef { /** * propertyタイプを表すリテラルです。 */ String PROPERTY_NAME = "property"; /** * fieldタイプを表すリテラルです。 */ String FIELD_NAME = "field"; /** * アクセスタイプ名を取得できます。 *

* アクセスタイプ名は、アクセスタイプを表す文字列です。 * * @return アクセスタイプ名 * * @see #PROPERTY_NAME * @see #FIELD_NAME */ String getName(); /** * コンポーネント定義、プロパティ定義、及び自身のアクセスタイプ定義に基づいて、 DIコンテナ上のオブジェクトグラフに、 * コンポーネントをバインドします。 * * @param componentDef * コンポーネント定義 * @param propertyDef * プロパティ定義 * @param component * コンポーネント */ void bind(ComponentDef componentDef, PropertyDef propertyDef, Object component); /** * コンポーネント定義、プロパティ定義、バインディングタイプ定義、及び自身のアクセスタイプ定義に基づいて、 * DIコンテナ上のオブジェクトグラフにコンポーネントをバインドします。 * * @param componentDef * コンポーネント定義 * @param propertyDef * プロパティ定義 * @param bindingTypeDef * バインディングタイプ定義 * @param component * コンポーネント */ void bind(ComponentDef componentDef, PropertyDef propertyDef, BindingTypeDef bindingTypeDef, Object component); }