-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from segfly/master
Custom injectors support
- Loading branch information
Showing
5 changed files
with
111 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/ru/vyarus/dropwizard/guice/api/InjectorFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package ru.vyarus.dropwizard.guice.api; | ||
|
||
import com.google.inject.Injector; | ||
import com.google.inject.Module; | ||
import com.google.inject.Stage; | ||
|
||
/** | ||
* This interface may be implemented to provide custom Guice injectors and support certain types of Guice extension | ||
* libraries. | ||
* | ||
* @author Nicholas Pace | ||
* @since Dec 26, 2014 | ||
*/ | ||
public interface InjectorFactory { | ||
|
||
/** | ||
* Creates an injector instance. | ||
* | ||
* @param stage | ||
* The stage for which the injector is created. | ||
* @param modules | ||
* A list of modules for the injector. | ||
* @return A new injector. | ||
*/ | ||
Injector createInjector(Stage stage, Iterable<? extends Module> modules); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters