Package org.restlet.ext.guice
Class RestletGuice
- java.lang.Object
-
- org.restlet.ext.guice.RestletGuice
-
public class RestletGuice extends java.lang.Object
Guice dependency injection for Restlet.- Author:
- Tim Peierls
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RestletGuice.Module
A Guice module that implementsFinderFactory
.
-
Constructor Summary
Constructors Constructor Description RestletGuice()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.inject.Injector
createInjector(com.google.inject.Module... modules)
Creates an instance ofInjector
from the given modules withFinderFactory
bound to an implementation that uses the injector's bindings to create Finder instances.static com.google.inject.Injector
createInjector(com.google.inject.Stage stage, com.google.inject.Module... modules)
Creates an instance ofInjector
in the givenStage
from the given modules withFinderFactory
bound to an implementation that uses the injector's bindings to createFinder
instances.static com.google.inject.Injector
createInjector(com.google.inject.Stage stage, java.lang.Iterable<com.google.inject.Module> modules)
Creates an instance ofInjector
in the givenStage
from the given modules withFinderFactory
bound to an implementation that uses the injector's bindings to createFinder
instances.static com.google.inject.Injector
createInjector(java.lang.Iterable<com.google.inject.Module> modules)
Creates an instance ofInjector
from the given modules withFinderFactory
bound to an implementation that uses the injector's bindings to create Finder instances.
-
-
-
Method Detail
-
createInjector
public static com.google.inject.Injector createInjector(com.google.inject.Module... modules)
Creates an instance ofInjector
from the given modules withFinderFactory
bound to an implementation that uses the injector's bindings to create Finder instances.- Parameters:
modules
- The list of modules.- Returns:
- The injector for the list of modules.
-
createInjector
public static com.google.inject.Injector createInjector(java.lang.Iterable<com.google.inject.Module> modules)
Creates an instance ofInjector
from the given modules withFinderFactory
bound to an implementation that uses the injector's bindings to create Finder instances.- Parameters:
modules
- The collection of modules.- Returns:
- The injector for the list of modules.
-
createInjector
public static com.google.inject.Injector createInjector(com.google.inject.Stage stage, com.google.inject.Module... modules)
Creates an instance ofInjector
in the givenStage
from the given modules withFinderFactory
bound to an implementation that uses the injector's bindings to createFinder
instances.- Parameters:
stage
- TheStage
.modules
- The list of modules.- Returns:
- The injector for the list of modules in the given stage.
-
createInjector
public static com.google.inject.Injector createInjector(com.google.inject.Stage stage, java.lang.Iterable<com.google.inject.Module> modules)
Creates an instance ofInjector
in the givenStage
from the given modules withFinderFactory
bound to an implementation that uses the injector's bindings to createFinder
instances.- Parameters:
stage
- TheStage
.modules
- The list of modules.- Returns:
- The injector for the list of modules in the given stage.
-
-