Package org.apache.cayenne.di
Interface AdhocObjectFactory
- All Known Implementing Classes:
DefaultAdhocObjectFactory
public interface AdhocObjectFactory
Creates objects for user-provided String class names, injecting dependencies
into them.
- Since:
- 3.1
-
Method Summary
Modifier and TypeMethodDescription<T> Class<? extends T> 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, Class<? extends T> type, boolean skipInjection) Returns an instance of "type" that implements "superType", injecting dependencies from the registry into it if requesteddefault <T> TnewInstance(Class<? super T> superType, String className) Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it.<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 requested
-
Method Details
-
newInstance
Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it. -
newInstance
Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it if requested- Since:
- 5.0
-
newInstance
Returns an instance of "type" that implements "superType", injecting dependencies from the registry into it if requested- Since:
- 5.0
-
getJavaClass
Returns a Java class loaded using ClassLoader returned fromClassLoaderManager.getClassLoader(String)for a given class name.- Since:
- 4.0
-