org.seasar.framework.container
インタフェース BindingTypeDef

既知の実装クラスの一覧:
AbstractBindingTypeDef

public interface BindingTypeDef

コンポーネントをインジェクションする時の動作を表すバインディングタイプを定義するインターフェースです。

バインディングタイプ定義には、 以下のものがあります。

must
自動バインディングが適用できなかった場合、 例外が発生します。
should
自動バインディングが適用できなかった場合、 警告を通知します。
may
自動バインディングが適用できなかった場合でも何もおきません。
none
自動バインディングタイプ定義autopropertyの場合でも自動バインディングを適用しません。

作成者:
higa, jundu

フィールドの概要
static java.lang.String MAY_NAME
          バインディングタイプ定義名「may」を表す定数です。
static java.lang.String MUST_NAME
          バインディングタイプ定義名「must」を表す定数です。
static java.lang.String NONE_NAME
          バインディングタイプ定義名「none」を表す定数です。
static java.lang.String SHOULD_NAME
          バインディングタイプ定義名「should」を表す定数です。
 
メソッドの概要
 void bind(ComponentDef componentDef, PropertyDef propertyDef, java.lang.reflect.Field field, java.lang.Object component)
          バインディングタイプ定義に基づいて、 componentに対してS2コンテナ上のコンポーネントをフィールドに直接インジェクションします。
 void bind(ComponentDef componentDef, PropertyDef propertyDef, PropertyDesc propertyDesc, java.lang.Object component)
          バインディングタイプ定義に基づいて、 componentに対してS2コンテナ上のコンポーネントをプロパティ経由でインジェクションします。
 java.lang.String getName()
          バインディングタイプ定義名を返します。
 

フィールドの詳細

MUST_NAME

public static final java.lang.String MUST_NAME
バインディングタイプ定義名「must」を表す定数です。

関連項目:
定数フィールド値

SHOULD_NAME

public static final java.lang.String SHOULD_NAME
バインディングタイプ定義名「should」を表す定数です。

関連項目:
定数フィールド値

MAY_NAME

public static final java.lang.String MAY_NAME
バインディングタイプ定義名「may」を表す定数です。

関連項目:
定数フィールド値

NONE_NAME

public static final java.lang.String NONE_NAME
バインディングタイプ定義名「none」を表す定数です。

関連項目:
定数フィールド値
メソッドの詳細

getName

public java.lang.String getName()
バインディングタイプ定義名を返します。

戻り値:
バインディングタイプ定義名

bind

public void bind(ComponentDef componentDef,
                 PropertyDef propertyDef,
                 PropertyDesc propertyDesc,
                 java.lang.Object component)
バインディングタイプ定義に基づいて、 componentに対してS2コンテナ上のコンポーネントをプロパティ経由でインジェクションします。

パラメータ:
componentDef - コンポーネント定義
propertyDef - プロパティに対する設定方法や設定値の定義
propertyDesc - 対象となるコンポーネントのプロパティ情報
component - 対象となるコンポーネントのインスタンス
例外:
IllegalPropertyRuntimeException - propertyDefに指定されたコンポーネントが取得できなかった場合、 または取得したコンポーネントがインジェクションできなかった場合

bind

public void bind(ComponentDef componentDef,
                 PropertyDef propertyDef,
                 java.lang.reflect.Field field,
                 java.lang.Object component)
バインディングタイプ定義に基づいて、 componentに対してS2コンテナ上のコンポーネントをフィールドに直接インジェクションします。

パラメータ:
componentDef - コンポーネント定義
propertyDef - プロパティに対する設定方法や設定値の定義
field - 対象となるコンポーネントのフィールド情報
component - 対象となるコンポーネントのインスタンス
例外:
IllegalPropertyRuntimeException - propertyDefに指定されたコンポーネントが取得できなかった場合
IllegalAccessRuntimeException - 対象となるコンポーネントのフィールドがprivateなどでアクセスできなかった場合


Copyright © 2004-2014 The Seasar Foundation. All Rights Reserved.