|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
コンポーネントをインジェクションする時の動作を表すバインディングタイプを定義するインターフェースです。
バインディングタイプ定義には、 以下のものがあります。
must
should
may
none
自動バインディングタイプ定義
がauto
やproperty
の場合でも自動バインディングを適用しません。
フィールドの概要 | |
static String |
MAY_NAME
バインディングタイプ定義名「 may 」を表す定数です。 |
static String |
MUST_NAME
バインディングタイプ定義名「 must 」を表す定数です。 |
static String |
NONE_NAME
バインディングタイプ定義名「 none 」を表す定数です。 |
static String |
SHOULD_NAME
バインディングタイプ定義名「 should 」を表す定数です。 |
メソッドの概要 | |
void |
bind(ComponentDef componentDef,
PropertyDef propertyDef,
Field field,
Object component)
バインディングタイプ定義に基づいて、 component に対してS2コンテナ上のコンポーネントをフィールドに直接インジェクションします。 |
void |
bind(ComponentDef componentDef,
PropertyDef propertyDef,
PropertyDesc propertyDesc,
Object component)
バインディングタイプ定義に基づいて、 component に対してS2コンテナ上のコンポーネントをプロパティ経由でインジェクションします。 |
String |
getName()
バインディングタイプ定義名を返します。 |
フィールドの詳細 |
public static final String MUST_NAME
must
」を表す定数です。
public static final String SHOULD_NAME
should
」を表す定数です。
public static final String MAY_NAME
may
」を表す定数です。
public static final String NONE_NAME
none
」を表す定数です。
メソッドの詳細 |
public String getName()
public void bind(ComponentDef componentDef, PropertyDef propertyDef, PropertyDesc propertyDesc, Object component)
component
に対してS2コンテナ上のコンポーネントをプロパティ経由でインジェクションします。
componentDef
- コンポーネント定義propertyDef
- プロパティに対する設定方法や設定値の定義propertyDesc
- 対象となるコンポーネントのプロパティ情報component
- 対象となるコンポーネントのインスタンス
IllegalPropertyRuntimeException
- propertyDef
に指定されたコンポーネントが取得できなかった場合、
または取得したコンポーネントがインジェクションできなかった場合public void bind(ComponentDef componentDef, PropertyDef propertyDef, Field field, Object component)
component
に対してS2コンテナ上のコンポーネントをフィールドに直接インジェクションします。
componentDef
- コンポーネント定義propertyDef
- プロパティに対する設定方法や設定値の定義field
- 対象となるコンポーネントのフィールド情報component
- 対象となるコンポーネントのインスタンス
IllegalPropertyRuntimeException
- propertyDef
に指定されたコンポーネントが取得できなかった場合
IllegalAccessRuntimeException
- 対象となるコンポーネントのフィールドがprivate
などでアクセスできなかった場合
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |