| java.lang.Object com.bm.ejb3guice.inject.Ejb3Guice
Ejb3Guice | final public class Ejb3Guice (Code) | | The entry point to the Guice framework. Creates
Injector s from
Module s.
Guice supports a model of development that draws clear boundaries between
APIs, Implementations of these APIs, Modules which configure these
implementations, and finally Applications which consist of a collection of
Modules. It is the Application, which typically defines your
main() method, that bootstraps the Guice Injector using the
Guice class, as
in this example:
public class FooApplication {
public static void main(String[] args) {
Injector injector = Guice.createInjector(
new ModuleA(),
new ModuleB(),
. . .
new FooApplicationFlagsModule(args)
);
// Now just bootstrap the application and you're done
MyStartClass starter = injector.getInstance(MyStartClass.class);
starter.runApplication();
}
}
|
Method Summary | |
public static Injector | createInjector(Module... modules) Creates an injector for the given set of modules. | public static Injector | createInjector(Iterable<Module> modules) Creates an injector for the given set of modules. | public static Injector | createInjector(Stage stage, Module... modules) Creates an injector for the given set of modules, in a given development
stage. | public static Injector | createInjector(Stage stage, Class<? extends Annotation>[] injectionMarkers, CreationListner crListner, Module... modules) Creates an injector for the given set of modules, in a given development
stage. | public static Injector | createInjector(Stage stage, Iterable<Module> modules) Creates an injector for the given set of modules, in a given development
stage. | public static Injector | createInjector(Stage stage, Iterable<Module> modules, Class<? extends Annotation>[] injectionMarkers, CreationListner crListner) Creates an injector for the given set of modules, in a given development
stage. | public static Class<? extends Annotation>[] | markerToArray(Class<? extends Annotation>... annotations) |
createInjector | public static Injector createInjector(Module... modules)(Code) | | Creates an injector for the given set of modules.
throws: CreationException - if one or more errors occur during Injector construction |
createInjector | public static Injector createInjector(Stage stage, Module... modules)(Code) | | Creates an injector for the given set of modules, in a given development
stage.
throws: CreationException - if one or more errors occur during Injector construction |
createInjector | public static Injector createInjector(Stage stage, Class<? extends Annotation>[] injectionMarkers, CreationListner crListner, Module... modules)(Code) | | Creates an injector for the given set of modules, in a given development
stage. Additionally own marker annotations can be provided.
throws: CreationException - if one or more errors occur during Injector construction |
createInjector | public static Injector createInjector(Stage stage, Iterable<Module> modules)(Code) | | Creates an injector for the given set of modules, in a given development
stage.
throws: CreationException - if one or more errors occur during Injector construction |
|
|