Class DefaultAdhocObjectFactory
java.lang.Object
org.apache.cayenne.di.spi.DefaultAdhocObjectFactory
- All Implemented Interfaces:
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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultAdhocObjectFactory(Injector injector, ClassLoaderManager classLoaderManager) -
Method Summary
Modifier and TypeMethodDescriptionClass<?> getJavaClass(String className) Returns a Java class loaded using ClassLoader returned fromClassLoaderManager.getClassLoader(String)for a given class name.<T> TnewInstance(Class<? super T> superType, String className, boolean skipInjection) Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it if requestedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AdhocObjectFactory
newInstanceModifier and TypeMethodDescriptiondefault <T> TnewInstance(Class<? super T> superType, String className) Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it.
-
Field Details
-
injector
-
classLoaderManager
-
-
Constructor Details
-
DefaultAdhocObjectFactory
- Since:
- 4.0
-
-
Method Details
-
newInstance
Description copied from interface:AdhocObjectFactoryReturns an instance of "className" that implements "superType", injecting dependencies from the registry into it if requested- Specified by:
newInstancein interfaceAdhocObjectFactory
-
getJavaClass
Description copied from interface:AdhocObjectFactoryReturns a Java class loaded using ClassLoader returned fromClassLoaderManager.getClassLoader(String)for a given class name.- Specified by:
getJavaClassin interfaceAdhocObjectFactory
-