BUILDER - このビルダーのサブクラスpublic class ContainerBuilder<BUILDER extends ContainerBuilder<BUILDER>>
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
protected ErrorCollector | 
errorCollector
バリデーションエラーを収集するクラス 
 | 
| Constructor and Description | 
|---|
ContainerBuilder()
インスタンスを生成する。 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addError(ContainerException exception)
バリデーションエラーを追加する。 
 | 
Container | 
build()
DIコンテナを構築する。 
 | 
java.util.Set<ComponentDefinition<?>> | 
findComponentDefinitions(ComponentKey<?> key)
コンポーネント定義を検索する。 
 | 
BUILDER | 
ignoreError(java.lang.Class<? extends ContainerException> ignoreMe)
ErrorCollector.throwExceptionIfExistsError()で無視をする例外クラスを設定する。 | 
<T> BUILDER | 
register(ComponentKey<T> key,
        ComponentDefinition<T> definition)
コンポーネント定義を登録する。 
 | 
void | 
validateCycleDependency(ComponentKey<?> key,
                       ComponentDefinition<?> target)
依存関係の循環を検出するためのバリデーションを行う。 
 | 
protected final ErrorCollector errorCollector
public BUILDER ignoreError(java.lang.Class<? extends ContainerException> ignoreMe)
ErrorCollector.throwExceptionIfExistsError()で無視をする例外クラスを設定する。ignoreMe - 無視される例外クラスpublic <T> BUILDER register(ComponentKey<T> key, ComponentDefinition<T> definition)
T - コンポーネントの型key - 検索キーdefinition - コンポーネント定義public java.util.Set<ComponentDefinition<?>> findComponentDefinitions(ComponentKey<?> key)
key - 検索キーpublic void validateCycleDependency(ComponentKey<?> key, ComponentDefinition<?> target)
key - 検索キーtarget - 対象となるコンポーネント定義public void addError(ContainerException exception)
exception - バリデーションエラーpublic Container build()