org.apache.camel.spi
Interface Injector

All Known Implementing Classes:
GuiceInjector, ReflectionInjector, SpringInjector

public interface Injector

A pluggable strategy for creating and possibly dependency injecting objects which could be implemented using straight forward reflection or using Spring or Guice to perform dependency injection.

Version:

Method Summary
<T> T
newInstance(Class<T> type)
          Instantiates a new instance of the given type possibly injecting values into the object in the process
<T> T
newInstance(Class<T> type, Object instance)
          Instantiates a new instance of the given object type possibly injecting values into the object in the process
 

Method Detail

newInstance

<T> T newInstance(Class<T> type)
Instantiates a new instance of the given type possibly injecting values into the object in the process

Parameters:
type - the type of object to create
Returns:
a newly created instance

newInstance

<T> T newInstance(Class<T> type,
                  Object instance)
Instantiates a new instance of the given object type possibly injecting values into the object in the process

Parameters:
type - the type of object to create
instance - an instance of the type to create
Returns:
a newly created instance


Apache CAMEL