|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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
BindException
createInjector(Object...)
public static void close()
GuiceexInjector
インスタンスを終了します。
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |