org.seasar.framework.container.customizer
クラス MetaCustomizer

java.lang.Object
  拡張org.seasar.framework.container.customizer.AbstractCustomizer
      拡張org.seasar.framework.container.customizer.MetaCustomizer
すべての実装インタフェース:
ComponentCustomizer

public class MetaCustomizer
extends AbstractCustomizer

コンポーネント定義メタデータ定義を 登録するコンポーネントカスタマイザです。

コンポーネント定義に登録するメタデータ定義は、カスタマイザ自身のコンポーネント定義に autoRegisterという名前で定義されたメタデータ定義に設定されたメタデータ定義となります。 diconファイルでは次のように記述します。

 <component class="org.seasar.framework.container.customizer.MetaCustomizer">
   <meta name="autoRegister">
     <meta name="remoting"/>
   </meta>
 </component>
 

この例では、remotingという名前を持つメタデータ定義がコンポーネント定義に 設定されます。 autoRegisterという名前で定義されたメタデータ定義には、複数のメタデータ定義を 設定することができます。その場合、すべてのメタデータ定義がそのままの順番でコンポーネント定義に 設定されます。

作成者:
koichik

フィールドの概要
protected  ComponentDef componentDef
           
 
クラス org.seasar.framework.container.customizer.AbstractCustomizer から継承したフィールド
classPatterns, ignoreClassPatterns, targetInterface, targetInterface_BINDING
 
コンストラクタの概要
MetaCustomizer()
           
 
メソッドの概要
protected  void doCustomize(ComponentDef componentDef)
          カスタマイズ対象のコンポーネント定義をカスタマイズをします。
protected  MetaDef getMetaDef()
          このカスタマイザ自身のコンポーネント定義にautoRegisterという名前で定義されたメタデータ定義を返します。
 void setComponentDef(ComponentDef componentDef)
          コンポーネント定義を設定します。
 
クラス org.seasar.framework.container.customizer.AbstractCustomizer から継承したメソッド
addClassPattern, addClassPattern, addIgnoreClassPattern, addIgnoreClassPattern, customize, isMatchClassPattern, isMatchTargetInterface, setTargetInterface
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

componentDef

protected ComponentDef componentDef
コンストラクタの詳細

MetaCustomizer

public MetaCustomizer()
メソッドの詳細

setComponentDef

public void setComponentDef(ComponentDef componentDef)
コンポーネント定義を設定します。

このメソッドは、このコンポーネント自身のコンポーネント定義を引数として、S2コンテナから呼び出されることを意図しています。

パラメータ:
componentDef - コンポーネント定義

doCustomize

protected void doCustomize(ComponentDef componentDef)
カスタマイズ対象のコンポーネント定義をカスタマイズをします。

このカスタマイザ自身のコンポーネント定義にautoRegisterという名前で定義されたメタデータ定義に設定されたメタデータ定義を コンポーネント定義に登録します。

定義:
クラス AbstractCustomizer 内の doCustomize
パラメータ:
componentDef - コンポーネント定義

getMetaDef

protected MetaDef getMetaDef()
このカスタマイザ自身のコンポーネント定義にautoRegisterという名前で定義されたメタデータ定義を返します。

戻り値:
このカスタマイザ自身のコンポーネント定義にautoRegisterという名前で定義されたメタデータ定義


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