public abstract class LifecycleInjectorBuilder extends Object
LifecycleInjectorBuilder
.
By default this class will look for the GovernatorLifecycleInjectorBuilder
on the
classpath and attempt to use that; if that is not found it will fallback to
BeadledomLifecycleInjectorBuilder
. The Governator implementation should be preferred, but
this fallback behavior is required to support both Java 6 and Java 8 until Java 6 support is
dropped.
Warning: This class is part of the internal implementation for Guice
lifecycle containers and should not be used directly by consumers. Instead use
LifecycleContainer
and GuiceLifecycleContainers
.
Constructor and Description |
---|
LifecycleInjectorBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract LifecycleInjector |
createInjector()
Creates a new
LifecycleInjector with the builder modules. |
static LifecycleInjectorBuilder |
fromModules(List<com.google.inject.Module> modules)
Creates a new instance of
LifecycleInjectorBuilder with the specified modules. |
abstract LifecycleInjectorBuilder |
modules(List<com.google.inject.Module> modules)
Set or override the list of modules for the builder.
|
public static LifecycleInjectorBuilder fromModules(List<com.google.inject.Module> modules)
LifecycleInjectorBuilder
with the specified modules.modules
- the Guice modules to use for the injector builder.public abstract LifecycleInjectorBuilder modules(List<com.google.inject.Module> modules)
modules
- the Guice modules to use for the injector builder.public abstract LifecycleInjector createInjector()
LifecycleInjector
with the builder modules.Copyright © 2020 Cerner Innovation, Inc.. All rights reserved.