public class ReflectionInjector extends Object implements Injector
Injector
which just uses reflection to
instantiate new objects using their zero argument constructor. For more
complex implementations try the Spring or Guice implementations.Constructor and Description |
---|
ReflectionInjector() |
Modifier and Type | Method and Description |
---|---|
<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
|
public <T> T newInstance(Class<T> type)
Injector
newInstance
in interface Injector
type
- the type of object to createpublic <T> T newInstance(Class<T> type, Object instance)
Injector
newInstance
in interface Injector
type
- the type of object to createinstance
- an instance of the type to createApache Camel