public enum InjectorConfiguration extends Enum<InjectorConfiguration>
A thread-safe singleton holding the configuration information on how the Guice framework finds Guice Modules to configure the Guice Injector instance.
This singleton holds the Module annotation that all Guice Modules, that should be used to configure the injector,
MUST be annotated with. And the implementation of the GuiceModuleLoader
that will be used to find and load
the module classes.
By default the module annotation is configured to be GuiceModule
and the GuiceModuleLoader implementation
is configured to be GuiceModuleServiceLoader
.
These configurations can be changed by calling, setModuleAnnotation(Class)
and
setGuiceModuleLoader(GuiceModuleLoader)
,respectively.
Enum Constant and Description |
---|
INSTANCE
The Singleton instance of the InjectorConfiguration.
|
Modifier and Type | Method and Description |
---|---|
static void |
setGuiceModuleLoader(GuiceModuleLoader guiceModuleLoader)
Sets the
GuiceModuleLoader implementation that will be used to find and load module classes. |
static void |
setModuleAnnotation(Class<? extends Annotation> moduleAnnotation)
Sets the module annotation that all modules MUST be annotated with.
|
static void |
setStage(com.google.inject.Stage stage)
Sets the
Stage that the injector should run in. |
static InjectorConfiguration |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InjectorConfiguration[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final InjectorConfiguration INSTANCE
public static InjectorConfiguration[] values()
for (InjectorConfiguration c : InjectorConfiguration.values()) System.out.println(c);
public static InjectorConfiguration valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static void setModuleAnnotation(Class<? extends Annotation> moduleAnnotation)
moduleAnnotation
- The module annotation.public static void setGuiceModuleLoader(GuiceModuleLoader guiceModuleLoader)
GuiceModuleLoader
implementation that will be used to find and load module classes.guiceModuleLoader
- The GuiceModuleLoader implementation.public static void setStage(com.google.inject.Stage stage)
Stage
that the injector should run in. See Stage
for available stages
and their differences.stage
- The injector stage.Copyright © 2025 Open Identity Platform Community. All rights reserved.