org.seasar.framework.container.assembler
クラス AbstractBindingTypeDef

java.lang.Object
  拡張org.seasar.framework.container.assembler.AbstractBindingTypeDef
すべての実装インタフェース:
BindingTypeDef
直系の既知のサブクラス:
BindingTypeMayDef, BindingTypeMustDef, BindingTypeNoneDef, BindingTypeShouldDef

public abstract class AbstractBindingTypeDef
extends java.lang.Object
implements BindingTypeDef

バインディングタイプ定義の抽象クラスです。

作成者:
higa

フィールドの概要
 
インタフェース org.seasar.framework.container.BindingTypeDef から継承したフィールド
MAY_NAME, MUST_NAME, NONE_NAME, SHOULD_NAME
 
コンストラクタの概要
protected AbstractBindingTypeDef(java.lang.String name)
          AbstractBindingTypeDefを作成します。
 
メソッドの概要
 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コンテナ上のコンポーネントをプロパティ経由でインジェクションします。
protected  boolean bindAuto(ComponentDef componentDef, java.lang.reflect.Field field, java.lang.Object component)
          自動的にオブジェクトを結び付けます。
protected  boolean bindAuto(ComponentDef componentDef, PropertyDesc propertyDesc, java.lang.Object component)
          自動的にオブジェクトを結び付けます。
protected  void bindManual(ComponentDef componentDef, PropertyDef propertyDef, java.lang.reflect.Field field, java.lang.Object component)
          明示的な設定にもとづいてオブジェクトを結び付けます。
protected  void bindManual(ComponentDef componentDef, PropertyDef propertyDef, PropertyDesc propertyDesc, java.lang.Object component)
          明示的な設定にもとづいてオブジェクトを結び付けます。
protected abstract  void doBind(ComponentDef componentDef, java.lang.reflect.Field field, java.lang.Object component)
          オブジェクトを結びつけるためのメソッドです。
protected abstract  void doBind(ComponentDef componentDef, PropertyDesc propertyDesc, java.lang.Object component)
          オブジェクトを結びつけるためのメソッドです。
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          バインディングタイプ定義名を返します。
protected  java.lang.Object getValue(ComponentDef componentDef, java.lang.Object key, java.lang.Object component, java.lang.String propertyName)
          コンポーネントを返します。
protected  java.lang.Object getValue(ComponentDef componentDef, PropertyDef propertyDef, java.lang.Object component)
          プロパティの値を返します。
 int hashCode()
           
protected  boolean isAutoBindable(java.lang.String propertyName, java.lang.Class propertyType, ComponentDef cd)
          プロパティにコンポーネントを自動バインディング可能ならtrueを返します。
protected  void setValue(ComponentDef componentDef, java.lang.reflect.Field field, java.lang.Object component, java.lang.Object value)
          Fieldに値を設定します。
protected  void setValue(ComponentDef componentDef, PropertyDesc propertyDesc, java.lang.Object component, java.lang.Object value)
          プロパティに値を設定します。
 
クラス java.lang.Object から継承したメソッド
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AbstractBindingTypeDef

protected AbstractBindingTypeDef(java.lang.String name)
AbstractBindingTypeDefを作成します。

パラメータ:
name -
メソッドの詳細

getName

public java.lang.String getName()
インタフェース BindingTypeDef の記述:
バインディングタイプ定義名を返します。

定義:
インタフェース BindingTypeDef 内の getName
戻り値:
バインディングタイプ定義名

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

bind

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

定義:
インタフェース BindingTypeDef 内の bind
パラメータ:
componentDef - コンポーネント定義
propertyDef - プロパティに対する設定方法や設定値の定義
propertyDesc - 対象となるコンポーネントのプロパティ情報
component - 対象となるコンポーネントのインスタンス

bind

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

定義:
インタフェース BindingTypeDef 内の bind
パラメータ:
componentDef - コンポーネント定義
propertyDef - プロパティに対する設定方法や設定値の定義
field - 対象となるコンポーネントのフィールド情報
component - 対象となるコンポーネントのインスタンス

bindManual

protected void bindManual(ComponentDef componentDef,
                          PropertyDef propertyDef,
                          java.lang.reflect.Field field,
                          java.lang.Object component)
明示的な設定にもとづいてオブジェクトを結び付けます。

パラメータ:
componentDef -
propertyDef -
field -
component -
関連項目:
getValue(ComponentDef, PropertyDef, Object), setValue(ComponentDef, Field, Object, Object)

bindManual

protected void bindManual(ComponentDef componentDef,
                          PropertyDef propertyDef,
                          PropertyDesc propertyDesc,
                          java.lang.Object component)
明示的な設定にもとづいてオブジェクトを結び付けます。

パラメータ:
componentDef -
propertyDef -
propertyDesc -
component -
関連項目:
getValue(ComponentDef, PropertyDef, Object), setValue(ComponentDef, PropertyDesc, Object, Object)

bindAuto

protected boolean bindAuto(ComponentDef componentDef,
                           java.lang.reflect.Field field,
                           java.lang.Object component)
自動的にオブジェクトを結び付けます。

パラメータ:
componentDef -
field -
component -
戻り値:
オブジェクトを結び付けたかどうか
関連項目:
getValue(ComponentDef, Object, Object, String), setValue(ComponentDef, Field, Object, Object)

bindAuto

protected boolean bindAuto(ComponentDef componentDef,
                           PropertyDesc propertyDesc,
                           java.lang.Object component)
自動的にオブジェクトを結び付けます。

パラメータ:
componentDef -
propertyDesc -
component -
戻り値:
オブジェクトを結び付けたかどうか

isAutoBindable

protected boolean isAutoBindable(java.lang.String propertyName,
                                 java.lang.Class propertyType,
                                 ComponentDef cd)
プロパティにコンポーネントを自動バインディング可能ならtrueを返します。

パラメータ:
propertyName - プロパティ名
propertyType - プロパティの型
cd - コンポーネント定義
戻り値:
プロパティにコンポーネントを自動バインディング可能ならtrue

getValue

protected java.lang.Object getValue(ComponentDef componentDef,
                                    PropertyDef propertyDef,
                                    java.lang.Object component)
                             throws IllegalPropertyRuntimeException
プロパティの値を返します。

パラメータ:
componentDef -
propertyDef -
component -
戻り値:
プロパティの値
例外:
IllegalPropertyRuntimeException - RuntimeExceptionが発生した場合

getValue

protected java.lang.Object getValue(ComponentDef componentDef,
                                    java.lang.Object key,
                                    java.lang.Object component,
                                    java.lang.String propertyName)
                             throws IllegalPropertyRuntimeException
コンポーネントを返します。

パラメータ:
componentDef -
key -
component -
propertyName -
戻り値:
コンポーネント
例外:
IllegalPropertyRuntimeException - RuntimeExceptionが発生した場合

setValue

protected void setValue(ComponentDef componentDef,
                        PropertyDesc propertyDesc,
                        java.lang.Object component,
                        java.lang.Object value)
                 throws IllegalPropertyRuntimeException
プロパティに値を設定します。

パラメータ:
componentDef -
propertyDesc -
component -
value -
例外:
IllegalPropertyRuntimeException - NumberFormatExceptionが発生した場合

setValue

protected void setValue(ComponentDef componentDef,
                        java.lang.reflect.Field field,
                        java.lang.Object component,
                        java.lang.Object value)
                 throws IllegalPropertyRuntimeException
Fieldに値を設定します。

パラメータ:
componentDef -
field -
component -
value -
例外:
IllegalPropertyRuntimeException - NumberFormatExceptionが発生した場合

doBind

protected abstract void doBind(ComponentDef componentDef,
                               PropertyDesc propertyDesc,
                               java.lang.Object component)
オブジェクトを結びつけるためのメソッドです。

パラメータ:
componentDef -
propertyDesc -
component -

doBind

protected abstract void doBind(ComponentDef componentDef,
                               java.lang.reflect.Field field,
                               java.lang.Object component)
オブジェクトを結びつけるためのメソッドです。

パラメータ:
componentDef -
field -
component -


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