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 ReflectionInjector()
public <T> T newInstance(Class<T> type)
InjectornewInstance in interface Injectortype - the type of object to createpublic <T> T newInstance(Class<T> type, Object instance)
InjectornewInstance in interface Injectortype - the type of object to createinstance - an instance of the type to createApache Camel