org.apache.camel.impl
Class ReflectionInjector<T>
java.lang.Object
org.apache.camel.impl.ReflectionInjector<T>
- All Implemented Interfaces:
- Injector<T>
public class ReflectionInjector<T>
- extends Object
- implements Injector<T>
A simple implementation of Injector
which just uses reflection to instantiate new objects
using their zero argument constructor. For more complex implementations try the Spring or Guice implementations.
- Version:
- $Revision: 525537 $
Method Summary |
T |
newInstance(Class<T> type)
Instantiates a new instance of the given 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 |
ReflectionInjector
public ReflectionInjector()
newInstance
public 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<T>
- Parameters:
type
- the type of object to create
- Returns:
- a newly created instance
Copyright © 2007 Apache Software Foundation. All Rights Reserved.