org.apache.camel.guice.impl
Class GuiceInjector
java.lang.Object
org.apache.camel.guice.impl.GuiceInjector
- All Implemented Interfaces:
- Injector
public class GuiceInjector
- extends Object
- implements Injector
An injector which uses Guice to perform the dependency injection of types
- Version:
|
Constructor Summary |
GuiceInjector(com.google.inject.Injector injector)
|
|
Method Summary |
|
newInstance(Class<T> type)
Instantiates a new instance of the given type possibly injecting values
into the object in the process |
|
newInstance(Class<T> type,
Object instance)
Instantiates a new instance of the given object type possibly injecting values
into the object in the process |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GuiceInjector
public GuiceInjector(com.google.inject.Injector injector)
newInstance
public <T> T newInstance(Class<T> type)
- Description copied from interface:
Injector
- Instantiates a new instance of the given type possibly injecting values
into the object in the process
- Specified by:
newInstance in interface Injector
- Parameters:
type - the type of object to create
- Returns:
- a newly created instance
newInstance
public <T> T newInstance(Class<T> type,
Object instance)
- Description copied from interface:
Injector
- Instantiates a new instance of the given object type possibly injecting values
into the object in the process
- Specified by:
newInstance in interface Injector
- Parameters:
type - the type of object to createinstance - an instance of the type to create
- Returns:
- a newly created instance
Apache CAMEL