|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.zuena.guiceex.InjectorFactory
public class InjectorFactory
GuiceexInjectorインスタンスのファクトリクラスです。
作成したGuiceexInjectorインスタンスの管理をアプリケーションで行う場合は
createInjector(Object[])を使用し、InjectorFactoryによって管理する場合は
getInjector(Object[])を使用します。後者のメソッドは、GuiceexInjectorインスタンス
をInjectorFactoryのstaticフィールドに配置して管理するシングルトン
ファクトリメソッドです。
| メソッドの概要 | |
|---|---|
static void |
close()
管理している GuiceexInjectorインスタンスを終了します。 |
static GuiceexInjector |
createInjector(Object... configs)
Guice.createInjector(Module[])を使用してインスタンスを作成します。 |
static GuiceexInjector |
getInjector(Object... configs)
createInjector(Object...)で作成したGuiceexInjectorインスタンスを、
staticフィールドに配置して管理するシングルトンファクトリメソッドです。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| メソッドの詳細 |
|---|
public static GuiceexInjector createInjector(Object... configs)
throws ConfigurationException,
BindException
Guice.createInjector(Module[])を使用してインスタンスを作成します。
引数configsは、Moduleインスタンス及び(又は)guceex-cfg.xml
ファイルへのクラスパスを表す文字列である必要があります。
configs - Moduleインスタンス及び(又は)guceex-cfg.xml
ファイルへのクラスパスを表す文字列。もしくはそれらを含むObject型の配列。
GuiceexInjectorインスタンス
ConfigurationException - guceex-cfg.xmlの読み込みエラー時にスローされる。
BindException - バインディングエラー時にスローされる。
public static GuiceexInjector getInjector(Object... configs)
throws ConfigurationException,
BindException
createInjector(Object...)で作成したGuiceexInjectorインスタンスを、
staticフィールドに配置して管理するシングルトンファクトリメソッドです。
ConfigurationException
BindExceptioncreateInjector(Object...)public static void close()
GuiceexInjectorインスタンスを終了します。
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||