org.apache.cayenne.di.spi
Class DefaultAdhocObjectFactory
java.lang.Object
org.apache.cayenne.di.spi.DefaultAdhocObjectFactory
- All Implemented Interfaces:
- AdhocObjectFactory
public class DefaultAdhocObjectFactory
- extends java.lang.Object
- implements AdhocObjectFactory
A default implementation of AdhocObjectFactory
that creates objects using
default no-arg constructor and injects dependencies into annotated fields. Note that
constructor injection is not supported by this factory.
- Since:
- 3.1
Method Summary |
java.lang.Class<?> |
getJavaClass(java.lang.String className)
|
|
newInstance(java.lang.Class<? super T> superType,
java.lang.String className)
Returns an instance of "className" that implements "superType", injecting
dependencies from the registry into it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
injector
protected Injector injector
DefaultAdhocObjectFactory
public DefaultAdhocObjectFactory()
newInstance
public <T> T newInstance(java.lang.Class<? super T> superType,
java.lang.String className)
- Description copied from interface:
AdhocObjectFactory
- Returns an instance of "className" that implements "superType", injecting
dependencies from the registry into it.
- Specified by:
newInstance
in interface AdhocObjectFactory
getJavaClass
public java.lang.Class<?> getJavaClass(java.lang.String className)
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.