public final class DefaultContainer extends java.lang.Object implements Container, EventTrigger
Containerのデフォルト実装クラス。| Constructor and Description |
|---|
DefaultContainer(ComponentDefinitionRepository definitionsMap,
AliasMapping aliasesMap)
コンストラクタ。
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
DIコンテナを破棄する。
|
void |
fire(java.lang.Object event)
イベントを発火させる。
|
<T> T |
getComponent(java.lang.Class<T> key)
コンポーネントを取得する。
|
<T> T |
getComponent(java.lang.Class<T> key,
java.lang.annotation.Annotation... qualifiers)
コンポーネントを取得する。
|
<T> T |
getComponent(ComponentKey<T> key)
コンポーネントを取得する。
|
<T> java.util.Set<T> |
getComponents(java.lang.Class<T> key)
コンポーネントを取得する。
|
<T> T |
removeComponent(java.lang.Class<T> key)
コンポーネントを削除する。
|
<T> T |
removeComponent(java.lang.Class<T> key,
java.lang.annotation.Annotation... qualifiers)
コンポーネントを削除する。
|
<T> T |
removeComponent(ComponentKey<T> key)
コンポーネントを削除する。
|
public DefaultContainer(ComponentDefinitionRepository definitionsMap, AliasMapping aliasesMap)
definitionsMap - コンポーネント定義のリポジトリaliasesMap - エイリアスキーと検索キーのマッピングpublic <T> T getComponent(ComponentKey<T> key)
ContainergetComponent in interface ContainerT - コンポーネントの型key - 検索キーpublic <T> T removeComponent(java.lang.Class<T> key)
ContainerremoveComponent in interface ContainerT - コンポーネントの型key - 検索キーとなるクラスpublic <T> T removeComponent(java.lang.Class<T> key,
java.lang.annotation.Annotation... qualifiers)
ContainerremoveComponent in interface ContainerT - コンポーネントの型key - 検索キーとなるクラスqualifiers - 限定子public <T> T removeComponent(ComponentKey<T> key)
ContainerremoveComponent in interface ContainerT - コンポーネントの型key - 検索キーpublic <T> T getComponent(java.lang.Class<T> key)
ContainergetComponent in interface ContainerT - コンポーネントの型key - 検索キーとなるクラスpublic <T> T getComponent(java.lang.Class<T> key,
java.lang.annotation.Annotation... qualifiers)
ContainergetComponent in interface ContainerT - コンポーネントの型key - 検索キーとなるクラスqualifiers - 限定子public <T> java.util.Set<T> getComponents(java.lang.Class<T> key)
ContainergetComponents in interface ContainerT - コンポーネントの型key - 検索キーとなるクラスpublic void fire(java.lang.Object event)
EventTriggerfire in interface EventTriggerevent - イベント