Package dev.langchain4j.spi.classloading
Interface ClassInstanceFactory
public interface ClassInstanceFactory
A factory for providing instances of classes
Intended to be implemented by downstream frameworks (like Quarkus and Spring) where rather than creating classes on-the-fly, they will most likely be managed by some dependency injection framework.
-
Method Summary
Modifier and TypeMethodDescription<T> T
getInstanceOfClass
(Class<T> clazz) Provides an instance of the specified class type.
-
Method Details
-
getInstanceOfClass
Provides an instance of the specified class type.- Type Parameters:
T
- the type of the class- Parameters:
clazz
- the class object representing the type- Returns:
- an instance of the specified class type
-