org.seasar.framework.container.impl
クラス SimpleComponentDef

java.lang.Object
  拡張org.seasar.framework.container.impl.SimpleComponentDef
すべての実装インタフェース:
ArgDefAware, AspectDefAware, ComponentDef, DestroyMethodDefAware, InitMethodDefAware, InterTypeDefAware, MetaDefAware, PropertyDefAware
直系の既知のサブクラス:
ApplicationComponentDef, ApplicationMapComponentDef, CookieMapComponentDef, HttpServletRequestComponentDef, HttpServletResponseComponentDef, HttpSessionComponentDef, InitParameterMapComponentDef, PortletConfigComponentDef, PortletContextComponentDef, PortletRequestComponentDef, PortletResponseComponentDef, PortletSessionComponentDef, RequestComponentDef, RequestHeaderMapComponentDef, RequestHeaderValuesMapComponentDef, RequestMapComponentDef, RequestParameterMapComponentDef, RequestParameterValuesMapComponentDef, S2ContainerComponentDef, ServletContextComponentDef, SessionMapComponentDef, TooManyRegistrationComponentDefImpl

public class SimpleComponentDef
extends Object
implements ComponentDef

作成者:
higa

コンストラクタの概要
SimpleComponentDef()
           
SimpleComponentDef(Class componentClass)
           
SimpleComponentDef(Class componentClass, String componentName)
           
SimpleComponentDef(Object component)
           
SimpleComponentDef(Object component, Class componentClass)
           
SimpleComponentDef(Object component, Class componentClass, String componentName)
           
SimpleComponentDef(Object component, String componentName)
           
 
メソッドの概要
 void addArgDef(ArgDef constructorArgDef)
           
 void addAspectDef(AspectDef aspectDef)
          アスペクト定義を登録(追加)します。
 void addDestroyMethodDef(DestroyMethodDef methodDef)
          destroyメソッド定義を登録(追加)します。
 void addInitMethodDef(InitMethodDef methodDef)
           
 void addInterTypeDef(InterTypeDef interTypeDef)
           
 void addMetaDef(MetaDef metaDef)
           
 void addPropertyDef(PropertyDef propertyDef)
          プロパティ定義を登録(追加)します。
 void destroy()
          コンポーネント定義を破棄します。
 ArgDef getArgDef(int index)
           
 int getArgDefSize()
           
 AspectDef getAspectDef(int index)
          指定されたインデックス番号indexのアスペクト定義を返します。
 int getAspectDefSize()
          登録されているアスペクト定義の数を返します。
 AutoBindingDef getAutoBindingDef()
          自動バインディング定義を返します。
 Object getComponent()
          定義に基づいてコンポーネントを返します。
 Class getComponentClass()
          定義上のクラスを返します。
 String getComponentName()
          コンポーネント名を返します。
 Class getConcreteClass()
          アスペクト適用後の、 実際にインスタンス化されるコンポーネントのクラスを返します。
 S2Container getContainer()
          このコンポーネント定義を含むS2コンテナを返します。
 DestroyMethodDef getDestroyMethodDef(int index)
          指定されたインデックス番号indexのdestroyメソッド定義を返します。
 int getDestroyMethodDefSize()
          登録されているdestroyメソッド定義の数を返します。
 Expression getExpression()
          コンポーネントを生成する式を返します。
 InitMethodDef getInitMethodDef(int index)
           
 int getInitMethodDefSize()
           
 InstanceDef getInstanceDef()
          インスタンス定義を返します。
 InterTypeDef getInterTypeDef(int index)
           
 int getInterTypeDefSize()
           
 MetaDef getMetaDef(int index)
           
 MetaDef getMetaDef(String name)
           
 MetaDef[] getMetaDefs(String name)
           
 int getMetaDefSize()
           
 PropertyDef getPropertyDef(int index)
          指定されたインデックス番号indexプロパティ定義を返します。
 PropertyDef getPropertyDef(String propertyName)
          指定したプロパティ名で登録されているプロパティ定義を返します。
 int getPropertyDefSize()
          登録されているプロパティ定義の数を返します。
 boolean hasPropertyDef(String propertyName)
          指定したプロパティ名にプロパティ定義があればtrueを返します。
 void init()
          コンポーネント定義を初期化します。
 void injectDependency(Object outerComponent)
          外部コンポーネントouterComponentに対し、 コンポーネント定義に基づいて、 S2コンテナ上のコンポーネントをインジェクションします。
 boolean isExternalBinding()
          外部バインディングが有効な場合trueを返します。
 void setAutoBindingDef(AutoBindingDef autoBindingDef)
          自動バインディング定義を設定します。
 void setComponentName(String componentName)
          コンポーネント名を設定します。
 void setContainer(S2Container container)
          このコンポーネント定義を含むS2コンテナを設定します。
 void setExpression(Expression expression)
          コンポーネントを生成する式を設定します。
 void setExternalBinding(boolean externalBinding)
          外部バインディングを有効にする場合trueを設定します。
 void setInstanceDef(InstanceDef instanceDef)
          インスタンス定義を設定します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

SimpleComponentDef

public SimpleComponentDef()

SimpleComponentDef

public SimpleComponentDef(Class componentClass)

SimpleComponentDef

public SimpleComponentDef(Class componentClass,
                          String componentName)

SimpleComponentDef

public SimpleComponentDef(Object component)

SimpleComponentDef

public SimpleComponentDef(Object component,
                          Class componentClass)

SimpleComponentDef

public SimpleComponentDef(Object component,
                          String componentName)

SimpleComponentDef

public SimpleComponentDef(Object component,
                          Class componentClass,
                          String componentName)
メソッドの詳細

getComponent

public Object getComponent()
                    throws TooManyRegistrationRuntimeException
インタフェース ComponentDef の記述:
定義に基づいてコンポーネントを返します。

定義:
インタフェース ComponentDef 内の getComponent
戻り値:
コンポーネント
例外:
TooManyRegistrationRuntimeException - コンポーネント定義が重複している場合
関連項目:
TooManyRegistrationComponentDef

injectDependency

public void injectDependency(Object outerComponent)
インタフェース ComponentDef の記述:
外部コンポーネントouterComponentに対し、 コンポーネント定義に基づいて、 S2コンテナ上のコンポーネントをインジェクションします。

定義:
インタフェース ComponentDef 内の injectDependency
パラメータ:
outerComponent - 外部コンポーネント

getContainer

public S2Container getContainer()
インタフェース ComponentDef の記述:
このコンポーネント定義を含むS2コンテナを返します。

定義:
インタフェース ComponentDef 内の getContainer
戻り値:
S2コンテナ

setContainer

public void setContainer(S2Container container)
インタフェース ComponentDef の記述:
このコンポーネント定義を含むS2コンテナを設定します。

定義:
インタフェース ComponentDef 内の setContainer
パラメータ:
container - S2コンテナ

getComponentClass

public Class getComponentClass()
インタフェース ComponentDef の記述:
定義上のクラスを返します。 diconファイルの<component/>タグにおける、 class属性で指定されたクラスを表します。 自動バインディングされる際には、 このクラス(インターフェース)が使用されます。

定義:
インタフェース ComponentDef 内の getComponentClass
戻り値:
定義上のクラス

getComponentName

public String getComponentName()
インタフェース ComponentDef の記述:
コンポーネント名を返します。

定義:
インタフェース ComponentDef 内の getComponentName
戻り値:
コンポーネント名

setComponentName

public void setComponentName(String componentName)
インタフェース ComponentDef の記述:
コンポーネント名を設定します。

定義:
インタフェース ComponentDef 内の setComponentName
パラメータ:
componentName - コンポーネント名

getConcreteClass

public Class getConcreteClass()
インタフェース ComponentDef の記述:
アスペクト適用後の、 実際にインスタンス化されるコンポーネントのクラスを返します。

定義:
インタフェース ComponentDef 内の getConcreteClass
戻り値:
実際のクラス

addArgDef

public void addArgDef(ArgDef constructorArgDef)
定義:
インタフェース ArgDefAware 内の addArgDef

addPropertyDef

public void addPropertyDef(PropertyDef propertyDef)
インタフェース PropertyDefAware の記述:
プロパティ定義を登録(追加)します。

定義:
インタフェース PropertyDefAware 内の addPropertyDef
パラメータ:
propertyDef - プロパティ定義

addInitMethodDef

public void addInitMethodDef(InitMethodDef methodDef)
定義:
インタフェース InitMethodDefAware 内の addInitMethodDef

addDestroyMethodDef

public void addDestroyMethodDef(DestroyMethodDef methodDef)
インタフェース DestroyMethodDefAware の記述:
destroyメソッド定義を登録(追加)します。

定義:
インタフェース DestroyMethodDefAware 内の addDestroyMethodDef
パラメータ:
methodDef - destroyメソッド定義

addAspectDef

public void addAspectDef(AspectDef aspectDef)
インタフェース AspectDefAware の記述:
アスペクト定義を登録(追加)します。

定義:
インタフェース AspectDefAware 内の addAspectDef
パラメータ:
aspectDef - アスペクト定義

addInterTypeDef

public void addInterTypeDef(InterTypeDef interTypeDef)
定義:
インタフェース InterTypeDefAware 内の addInterTypeDef

getArgDefSize

public int getArgDefSize()
定義:
インタフェース ArgDefAware 内の getArgDefSize

getPropertyDefSize

public int getPropertyDefSize()
インタフェース PropertyDefAware の記述:
登録されているプロパティ定義の数を返します。

定義:
インタフェース PropertyDefAware 内の getPropertyDefSize
戻り値:
登録されているプロパティ定義の数

getInitMethodDefSize

public int getInitMethodDefSize()
定義:
インタフェース InitMethodDefAware 内の getInitMethodDefSize

getDestroyMethodDefSize

public int getDestroyMethodDefSize()
インタフェース DestroyMethodDefAware の記述:
登録されているdestroyメソッド定義の数を返します。

定義:
インタフェース DestroyMethodDefAware 内の getDestroyMethodDefSize
戻り値:
登録されているdestroyメソッド定義の数

getAspectDefSize

public int getAspectDefSize()
インタフェース AspectDefAware の記述:
登録されているアスペクト定義の数を返します。

登録されているインターセプタの数ではなく、 アスペクト定義の数を返します。 アスペクト定義のコンポーネント(インターセプタ)のクラスが InterceptorChainで、 その中に複数のインターセプタが含まれる場合も、 1つのアスペクト定義としてカウントします。

定義:
インタフェース AspectDefAware 内の getAspectDefSize
戻り値:
登録されているアスペクト定義の数

getInterTypeDefSize

public int getInterTypeDefSize()
定義:
インタフェース InterTypeDefAware 内の getInterTypeDefSize

getArgDef

public ArgDef getArgDef(int index)
定義:
インタフェース ArgDefAware 内の getArgDef

getPropertyDef

public PropertyDef getPropertyDef(int index)
インタフェース PropertyDefAware の記述:
指定されたインデックス番号indexプロパティ定義を返します。

定義:
インタフェース PropertyDefAware 内の getPropertyDef
パラメータ:
index - プロパティ定義を指定するインデックス番号
戻り値:
プロパティ定義

getPropertyDef

public PropertyDef getPropertyDef(String propertyName)
インタフェース PropertyDefAware の記述:
指定したプロパティ名で登録されているプロパティ定義を返します。

定義:
インタフェース PropertyDefAware 内の getPropertyDef
パラメータ:
propertyName - プロパティ名
戻り値:
プロパティ定義

hasPropertyDef

public boolean hasPropertyDef(String propertyName)
インタフェース PropertyDefAware の記述:
指定したプロパティ名にプロパティ定義があればtrueを返します。

定義:
インタフェース PropertyDefAware 内の hasPropertyDef
パラメータ:
propertyName - プロパティ定義
戻り値:
プロパティ定義が存在していればtrue、存在していなければfalse

getInitMethodDef

public InitMethodDef getInitMethodDef(int index)
定義:
インタフェース InitMethodDefAware 内の getInitMethodDef

getDestroyMethodDef

public DestroyMethodDef getDestroyMethodDef(int index)
インタフェース DestroyMethodDefAware の記述:
指定されたインデックス番号indexのdestroyメソッド定義を返します。

インデックス番号は、 登録した順番に 0,1,2,… となります。

定義:
インタフェース DestroyMethodDefAware 内の getDestroyMethodDef
パラメータ:
index - destroyメソッド定義を指定するインデックス番号
戻り値:
destroyメソッド定義

getAspectDef

public AspectDef getAspectDef(int index)
インタフェース AspectDefAware の記述:
指定されたインデックス番号indexのアスペクト定義を返します。

インデックス番号は、 登録した順番に 0,1,2,… となります。

定義:
インタフェース AspectDefAware 内の getAspectDef
パラメータ:
index - アスペクト定義を指定するインデックス番号
戻り値:
アスペクト定義

getInterTypeDef

public InterTypeDef getInterTypeDef(int index)
定義:
インタフェース InterTypeDefAware 内の getInterTypeDef

addMetaDef

public void addMetaDef(MetaDef metaDef)
定義:
インタフェース MetaDefAware 内の addMetaDef

getMetaDef

public MetaDef getMetaDef(int index)
定義:
インタフェース MetaDefAware 内の getMetaDef

getMetaDef

public MetaDef getMetaDef(String name)
定義:
インタフェース MetaDefAware 内の getMetaDef

getMetaDefs

public MetaDef[] getMetaDefs(String name)
定義:
インタフェース MetaDefAware 内の getMetaDefs

getMetaDefSize

public int getMetaDefSize()
定義:
インタフェース MetaDefAware 内の getMetaDefSize

getExpression

public Expression getExpression()
インタフェース ComponentDef の記述:
コンポーネントを生成する式を返します。

定義:
インタフェース ComponentDef 内の getExpression
戻り値:
コンポーネント生成式

setExpression

public void setExpression(Expression expression)
インタフェース ComponentDef の記述:
コンポーネントを生成する式を設定します。

定義:
インタフェース ComponentDef 内の setExpression

getInstanceDef

public InstanceDef getInstanceDef()
インタフェース ComponentDef の記述:
インスタンス定義を返します。

定義:
インタフェース ComponentDef 内の getInstanceDef
戻り値:
インスタンス定義

setInstanceDef

public void setInstanceDef(InstanceDef instanceDef)
インタフェース ComponentDef の記述:
インスタンス定義を設定します。

定義:
インタフェース ComponentDef 内の setInstanceDef
パラメータ:
instanceDef - インスタンス定義

getAutoBindingDef

public AutoBindingDef getAutoBindingDef()
インタフェース ComponentDef の記述:
自動バインディング定義を返します。

定義:
インタフェース ComponentDef 内の getAutoBindingDef
戻り値:
自動バインディング定義

setAutoBindingDef

public void setAutoBindingDef(AutoBindingDef autoBindingDef)
インタフェース ComponentDef の記述:
自動バインディング定義を設定します。

定義:
インタフェース ComponentDef 内の setAutoBindingDef
パラメータ:
autoBindingDef - 自動バインディング定義

isExternalBinding

public boolean isExternalBinding()
インタフェース ComponentDef の記述:
外部バインディングが有効な場合trueを返します。

外部バインディングとは、 外部コンテキストにあるオブジェクトを、 指定したコンポーネントの対応するプロパティにバインディングする機能です。

Webアプリケーションにおいて、 リクエストコンテキストに入力された値を、 リクエストインスタンスを通して取得し、 リクエスト間(ページ間)で透過的に引き継ぐ場合などに利用されます。

定義:
インタフェース ComponentDef 内の isExternalBinding
戻り値:
外部バインディングが有効な場合true
関連項目:
AbstractPropertyAssembler.bindExternally(BeanDesc, ComponentDef, Object, Set)

setExternalBinding

public void setExternalBinding(boolean externalBinding)
インタフェース ComponentDef の記述:
外部バインディングを有効にする場合trueを設定します。

定義:
インタフェース ComponentDef 内の setExternalBinding
パラメータ:
externalBinding - 外部バインディングを有効にする場合true

init

public void init()
インタフェース ComponentDef の記述:
コンポーネント定義を初期化します。

コンポーネントインスタンス定義singletonの場合には、 アスペクトを適用したインスタンスの生成、 配備、 プロパティ設定の後に、 initMethodが呼ばれます。

定義:
インタフェース ComponentDef 内の init
関連項目:
SingletonComponentDeployer.init()

destroy

public void destroy()
インタフェース ComponentDef の記述:
コンポーネント定義を破棄します。

コンポーネントインスタンス定義singletonの場合には、 destroyMethodが呼ばれます。

定義:
インタフェース ComponentDef 内の destroy
関連項目:
SingletonComponentDeployer.destroy()


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